[Catalyst] Performance

Dave Rolsky autarch at urth.org
Fri Mar 9 17:34:14 GMT 2007


On Fri, 9 Mar 2007, Bill Moseley wrote:

> I just checked and on some pages I'm calling uri_for a few hundred
> times.  If that's a bottle neck then optimization would be most
> welcome.

I did some hack-y testing of a (bad) memo-ized version:

Benchmark: timing 10000 iterations of memoized, not memoized...
   memoized:  0 wallclock secs ( 0.14 usr +  0.00 sys =  0.14 CPU) @ 71428.57/s (n=10000)
             (warning: too few iterations for a reliable count)
not memoized:  4 wallclock secs ( 3.73 usr +  0.00 sys =  3.73 CPU) @ 2680.97/s (n=10000)


Now, my memoized version isn't _really_ correct, because it doesn't 
account things like the arguments being objects or references, but I think 
there's a lot of potential for speedups here.


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/



More information about the Catalyst mailing list