Grand Central Dispatch Performance Issue

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs