Kent Johnson wrote:
> 
> At 4:30 PM -0400 4/18/01, Geir Magnusson Jr. wrote:
> >Kent Johnson wrote:
> >  > - I am seeing a few places where caching a value in a node could be
> >>  beneficial. For example, ASTNumberLiteral.value() parses its integer
> >>  value on each call. This is a relatively expensive operation. Another
> >>  example is ASTSetDirective.render() which calls String.substring() to
> >>  get the identifier name.
> >
> >The first we can fix.  The second one also is safe.  Consider them done.
> 
> The changes to ASTNumberLiteral, ASTReference and ASTSetDirective are great!
> 
> ASTNumberLiteral.value() went from about 6% of the total runtime to
> effectively 0.
> 
> ASTSetDirective.render() is about 20% faster.
> 
> ASTReference.render() is about 30% faster.
> 
> Template.merge() is about 10% faster overall!
> 
> Kent

Thanks for being the profiling master, you have the job :-)

-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://tambora.zenplex.org

Reply via email to