Jump to content

[Problem Solving #1] Deletable Primes

It takes ~.8 seconds with a 660ti as it was written in that post, which is about double what @Ciccioo 's solution takes. By using a sieve to calculate primes on the CPU then sending the rest of the problem to the GPU takes it down to about .4 seconds. It's not really a great problem for comparing parallel to serial because the serial algorithm is just so much more efficient than the parallel version because it takes advantage of previously calculated values.

WOW lol mind = blown, how in the heck did you get the sieve so fast? It takes forever for my sieve (compared to yours and @Ciccioo 's) at ~2.2s. I don't know much C but I was looking at Ciccioo's code and I never thought about doing a sieve in that way lol. I never thought of filling the list by multiplication instead of with modulus. I learn new things everyday lol. Imma see how much faster that sieve is, and get rid of using lists. And thanks for the insight.

 

And I am interested in utilizing the hundreds of cores on GPU to do stuff but I have to learn how first lol.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 year later...

this topic is still a thing?

 

the site is down and i would like to try this challenge :)

 

if it's not sorry for the digging.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×