And to add caching - Memoize!
As for actual profiling, its really easy to run your scripts under Devel::DProf (which comes with perl don'cha know) `perl5 -d:DProf test.pl` and after its finished, dprofpp. Sooper easy. I worked out an order of magnitude increase in some perl code speed by repeatedly testing my changes and assumptions against profiled code. And for those that are curious - it turns out that regex capturing can be a real dog some times.
In reply to Re: Re: Adventures in optimization (or: the good and bad side of being truly bored)
by diotalevi
in thread Adventures in optimization (or: the good and bad side of being truly bored)
by revdiablo
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |