[stringtemplate-interest] it's 60% of time in ObjectModelAdaptor.getProperty()
Terence Parr
parrt at cs.usfca.edu
Fri Feb 4 13:55:11 PST 2011
great info. i remember you told me a while back.
i wonder how easy this is in java using ASM or whatever. i'd have to generate stubs and then figure out how to load. it's a solved problem but i wonder if there is a simple example.
Ter
On Feb 4, 2011, at 1:50 PM, Sam Harwell wrote:
> In the CLR, it's particularly expensive to invoke a method through
> MethodInfo.Invoke or access a field through FieldInfo.GetValue. Most of the
> cost is due to various security/permission/binding checks associated with
> dynamic invocation. To save time, I dynamically generate stub methods and
> call them through delegates. This way, the binding only occurs once per
> method involved in the process. I don't have a large enough test available
> for real-world ST4 testing, but I'm working on porting over one of my ST3
> templates (produces several MB of output text). In ST3, GetProperty was less
> than 5% of the inclusive rendering time, and I don't expect that to change
> much for ST4. I'll let you know.
More information about the stringtemplate-interest
mailing list