[stringtemplate-interest] StringTemplate Compiler for .NET

Sam Harwell sharwell at pixelminegames.com
Tue Mar 17 03:38:07 PDT 2009


This caching method dropped ASTExpr.rawGetObjectProperty to 1.56%
(inclusive). I'm also creating/caching dynamic methods to construct the
lexers in StringTemplate.BreakTemplateIntoChunks. At this point it's
safe to say the reflection aspect of the StringTemplate evaluation is
not a significant performance bottleneck, which is great news for a
dynamically-typed language. I'll have to wait until tomorrow to check in
the updates.

Sam

-----Original Message-----
From: stringtemplate-interest-bounces at antlr.org
[mailto:stringtemplate-interest-bounces at antlr.org] On Behalf Of Volkan
Ceylan
Sent: Tuesday, March 17, 2009 3:52 AM
To: stringtemplate-interest at antlr.org
Subject: [stringtemplate-interest] StringTemplate Compiler for .NET

> By implementing a System.Type -> System.Reflection.MemberInfo map in
ASTExpr and
> caching the property accessors, I was able to reduce the time spent in
> ASTExpr.rawGetObjectProperty to 2.36% (inclusive).

This is a nice idea, would like to see implementation. There may be
even a further improvement by compiling property accessors as dynamic
methods such as (type, property) -> dynamic get delegate (though i'm
not %100 sure about that, need to see source code of new DLR)



More information about the stringtemplate-interest mailing list