On Fri, 8 Feb 2002, Andy Wardley wrote:

> > I'd expect process to have some overhead, but half the speed is a lot. The 
> > ratio is also roughly the same as I change the number of bugs:
> 
> Making a subroutine call, either in Perl or in TT is going to add overhead 
> that doesn't exist when you inline the code.  Here's a similar benchmark for
> Perl:
> 

<snip benchmark>

Hmm. I guess I din't realise that the overhead would be so much. (Although 
constant folding is sort of cheating, the benchmark still holds - I get 
3-4 times slowdown locally)

What are the chances that the template toolkit could inline PROCESSed (and
INCLUDEd) blocks for us?  Or at least non-recursive ones defined in the
same file? Conceptually, [% PROCESS foo bar=baz %] is the same as [% bar =
baz %] <contents of BLOCK foo>, right? There would probably be cases where
you didn't want inlining to happen, though. (eg size constraints)

That also doesn't explain with 2.06 is faster than 2.06d, although Myk's 
email about the html filter could explain that.

Bradley





Reply via email to