[stringtemplate-interest] caching getter lookup speedup
Sam Harwell
sharwell at pixelminegames.com
Tue Jan 11 11:44:37 PST 2011
Object property lookup (ASTExpr.RawGetObjectProperty) doesn't even appear on
the profiling reports for the C# port of ST3. Attribute lookup
(StringTemplate.GetAttribute) on the other hand is well over 50% of the time
spent inside StringTemplate.Write tested with rendering large grammars with
the C# port of ANTLR. That optimization should result in a substantial
overall performance improvement. :)
Sam
-----Original Message-----
From: stringtemplate-interest-bounces at antlr.org
[mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Terence Parr
Sent: Sunday, December 26, 2010 1:59 PM
To: stringtemplate-interest at antlr.org List
Subject: [stringtemplate-interest] caching getter lookup speedup
ok, added benchmarking code to v4. Tested speed with and w/o Method/Field
caching. about 10x improvement. Average units of work went from 32.77 to
395.22. This is a micro benchmark for property lookup.
timeSimplePropsOfArgs : 395.24 402.13 399.98 369.82 408.94 = 395.22
units of work / ms
timeSimplePropsOfArgs : 32.63 32.74 32.68 32.95 32.83 = 32.77
units of work / ms
Now I'm optimizing local attribute (arg) access. Sam Harwell will be happy
:) I'll check those numbers after impl.
Ter
_______________________________________________
stringtemplate-interest mailing list
stringtemplate-interest at antlr.org
http://www.antlr.org/mailman/listinfo/stringtemplate-interest
More information about the stringtemplate-interest
mailing list