[stringtemplate-interest] ST4 faster then ST3, some quick numbers

Terence Parr parrt at cs.usfca.edu
Wed Jan 19 20:30:41 PST 2011


apparently 10,000 is the magic number of iterations to warm up the compilation. Can you do it 10000 times and *then* run your tests?  Take a look in the benchmark dir actually. you'll see my tools based upon reading cliff click and josh bloch on micro benchmarking.

still, great news :)  once we get over compilation, I wonder how much faster just exec time is.

Ter
On Jan 19, 2011, at 6:03 PM, Collin Fagan wrote:

> Hi Everybody,
> 
> I did a quick benchmark comparing ST3 and ST4. 
> 
> ST3 - Time: 34.6 milliseconds
> ST4 - Time: 18.3 milliseconds 
> 
> These numbers are the average time it takes to generate 10 'builder' classes from 10 Swing classes averaged over 1000 trials. I tried to only benchmarked the ST code and ignored all the I/O and reflection. The only exception is that in both cases the template is loaded from a file using ST API calls. So it looks like that means ST4 is 47% faster then ST3 according to my meatball benchmarks. 
> 
> !YAY for ST4!
> 
> Collin
> 
> 
> 
>   
> 
> 
> 
> _______________________________________________
> 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