in reply to Re^11: Challenge: Number of unique ways to reach target sum
in thread Challenge: Number of unique ways to reach target sum
I have run this code on my machine and it finished in 53.5 minutes. I am not really shocked by this but I am impressed. The only optimizations the C code attempts to make is by limiting the number of the 17 trillion different sets it visits. Adding in a cache and some other neat doo-dads could probably blow this 53.5 minutes out of the water - but why bother. That is one of the beauties of Perl. The amount of time it would take to devise a C program to beat the Perl is more than time than it takes the Perl to run. Good Job.
Cheers - L~R
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^13: Challenge: Number of unique ways to reach target sum
by fergal (Chaplain) on Feb 16, 2006 at 20:29 UTC |