Thursday, June 9, 2011

PE5 optimizations

I implemented the optimization mentioned in the last post and got the running time down from 13 seconds to 3 seconds. Oh, and there is a pretty nifty time profiler that even shows the time taken by the individual functions.

Changing the program to only test even numbers got it from 13s to 9s, and checking only against 11 to 20 got it down to 3.

No comments:

Post a Comment