[stringtemplate-interest] speed/caching of template obj.prop refs
Terence Parr
parrt at cs.usfca.edu
Sat Mar 4 16:31:08 PST 2006
Howdy,
I've just impl. a cache that tracks all obj.prop refs and saves their
value. This saves lots of calls to the reflection lib. Running
ANTLR v3 I see about 16-18% fewer computations, but that is just the
lookups. It does consume some memory I'll bet for those cached
values but should be faster. The overall speed improvement will vary
with your application. ANTLR does not see a speed improvement as it
is mostly analysis work.
See
http://www.antlr.org/download/stringtemplate-2.3b6.jar
that has source/.class files in org/...
Please let me know if I broke your app or made it faster/slower. :)
See bugs/changes:
http://www.stringtemplate.org/bugs.tml
Ter
More information about the stringtemplate-interest
mailing list