![]() |
|
"be consistent" | |
PerlMonks |
Re: Cartesian Cross-Productsby Anonymous Monk |
on Feb 12, 2005 at 02:01 UTC ( [id://430358]=note: print w/replies, xml ) | Need Help?? |
Add "$#ret = $len -1" at line 64 for better performance.
For a 100*65*20 set, benchmark results are:
Benchmark: timing 10 iterations of new, old...
new: 16 wallclock secs (15.59 usr + 0.09 sys = 15.68 CPU) @ 0.64/s (n=10)
old: 21 wallclock secs (20.16 usr + 0.10 sys = 20.26 CPU) @ 0.49/s (n=10)
In Section
Craft
|
|