Google TH 2008 Reloaded
Following my first attempt, I optimized the scripts and improved on my times considerably. I’m really happy with the outcome considering it was all done with PHP. My faith in this platform is increasing :). Note that I also used a slower computer (a laptop) this timeand I decided to to my own time measuring to exclude the loading of the prime numbers (if you think this is cheating then you can simply run the scripts using the time command).
Results:
php -f google_th_4b.php Loading primes... done. Solving for inputs 25, 129, 139, 1087, 1199… Found prime number 9256873 in 0.32996106147766 seconds.
php -f google_th_4b.php Loading primes... done. Solving for inputs 7, 17, 41, 541… Found prime number 7830239 in 0.75763010978699 seconds.
Sources:
Enjoyed this post?, why not subscribe to the RSS feed!