velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Juozas Baliuka" <bali...@mail.lt>
Subject Re: Compiler was Re: [PATCH] optimization
Date Wed, 28 Aug 2002 18:52:34 GMT

Agree,
but may be it was some motivation to add Compiler class and to have it on
"TODO". ?


>
> ----- Original Message -----
> From: "Juozas Baliuka" <baliuka@mail.lt>
> To: "Velocity Developers List" <velocity-dev@jakarta.apache.org>
> 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
> nevertheless...)
>
> 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...)
>
> Attila.
>
>
> --
> To unsubscribe, e-mail:
<mailto:velocity-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:velocity-dev-help@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <mailto:velocity-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-dev-help@jakarta.apache.org>


Mime
View raw message