Grand Central Dispatch Performance Issue

C

Chris Mowforth

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

Attachments:
http://www.ruby-forum.com/attachment/4105/primes.c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top