# Grand Central Dispatch Performance Issue

**URL:** <https://www.ruby-forum.com/t/grand-central-dispatch-performance-issue/176757>\
**Category:** Ruby\
**Created:** [October 5, 2009, 10:43pm UTC](https://www.ruby-forum.com/t/grand-central-dispatch-performance-issue/176757 "2009-10-05T22:43:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrismalek](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/6de8d8/32.png) [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Post date:** [October 5, 2009, 10:43pm UTC](https://www.ruby-forum.com/t/grand-central-dispatch-performance-issue/176757/1 "2009-10-05T22:43:28Z")

</div>

Hey all,

I’ve been playing around with Grand Central dispatch and out of  
curiosity trying to see it it’s of any use in getting native MRI  
extensions to execute more quickly.

In this example I’ve just created a simple ‘Primes’ class with a  
#generate method which returns the last prime number before 500,000.

Right now, however, I’m getting consistently lower times with the plain  
old prime function (for low cut-off values using dispatch\_apply, grand  
central took almost twice as long).

Has anybody else had better luck than me with this sort of thing?

Thanks  
Chris
