velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Attila Szegedi" <>
Subject Re: Compiler was Re: [PATCH] optimization
Date Wed, 28 Aug 2002 08:53:22 GMT

----- Original Message -----
From: "Juozas Baliuka" <>
To: "Velocity Developers List" <>
Sent: Tuesday, August 27, 2002 10:15 PM
Subject: Compiler was Re: [PATCH] optimization

> Hi,
> I see some incomplete compiler.
> Doe's somebody works on Compiler (  Tree -> byte code ) ?

I guess it was discussed earlier here (or maybe it was on FreeMarker list? I
don't remember, however the reasoning stands for both projects

Basically, the only thing you could optimize would be tree traversal -
instead of walking the AST tree on every evaluation and calling the
appropriate method on every node, you could generate the bytecode that would
essentially be the sequence of these same method calls on every node in the
preorder traversal. That would buy you minimal speed improvement, so it's
just not worth the effort. If you *really* want templates compiled to
bytecode, check out the Tea template engine - it always compiles templates
to bytecode (as a consequence, the Tea template language is strongly typed,
which is an unusual feature in template engines...)


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message