[stringtemplate-interest] it's 60% of time in ObjectModelAdaptor.getProperty()

Terence Parr parrt at cs.usfca.edu
Mon Feb 7 08:56:45 PST 2011


compiler has to warm up 10,000 execs on that code and you have to count compilation time + additional GC etc...
Ter
On Feb 6, 2011, at 9:47 PM, Johan Stuyts wrote:

>> Oh, I thought you were talking about on the fly compilation. I highly
>> doubt (though I have zero numbers to prove) that there are many
>> scenarios where on the fly compilation is actually faster than dynamic
>> invocation.
> 
> Indeed. You would have to benchmark it to see if the additional complexity  
> and effort is worth it.
> 
> I once ran a simple test where I replaced an Interpreter pattern with code  
> compiled with Janino[1]. The code got called very often, so I figured  
> HotSpot would kick in and convert it to very efficient native code.  
> Unfortunately the results were disappointing. The Interpreter-style code  
> was faster than the generated classes. But this was quite a number of  
> years ago, so things might have changed.
> 
> Johan
> 
> 1. http://docs.codehaus.org/display/JANINO/Home
> _______________________________________________
> 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