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
===================================================*/

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to