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

Terence Parr parrt at cs.usfca.edu
Thu Jan 20 09:22:26 PST 2011


I couldn't get caliper to work for me so i spent a few hours and built a poorman's version.
Ter
On Jan 20, 2011, at 1:31 AM, Oliver Zeigermann wrote:

> I was using caliper for the micro benchmarking of a simple template
> language that allows both compiled and interpreted mode. As there is
> quite a bit of dynamic (runtime) stuff that can't be directly compiled
> in template languages the speedup was only between 2 and 5.
> 
> 2011/1/20 Terence Parr <parrt at cs.usfca.edu>:
>> 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
>> 
>> _______________________________________________
>> stringtemplate-interest mailing list
>> stringtemplate-interest at antlr.org
>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
>> 
> _______________________________________________
> 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