[stringtemplate-interest] ST4 faster then ST3, some quick numbers
Collin Fagan
collin.fagan at gmail.com
Thu Jan 20 05:43:11 PST 2011
Warming up for 10,000 iterations before executing 1000 operations yields the
following results.
Total ST3 - Time:40.993
Total ST4 - Time:15.497
So this indicates a 62% increase in speed. 62 is close enough to 47 that I
don't think warming up makes much difference, but here it is.
For me and the way I use ST I'm comfortable saying ST4 is about twice as
fast as ST3 and I'm darn happy about that.
Collin
On Wed, Jan 19, 2011 at 10:30 PM, Terence Parr <parrt at cs.usfca.edu> wrote:
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20110120/3ef54447/attachment.html
More information about the stringtemplate-interest
mailing list