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

Terence Parr parrt at cs.usfca.edu
Thu Jan 20 09:21:53 PST 2011


On Jan 20, 2011, at 5:43 AM, Collin Fagan wrote:

> 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.

I read that as 2.66x faster vs 1.89x w/o warmup. :)  Anyway, st4 appears to be faster. warmup just emphasizes but doesn't matter if you are generating 10 emails or a tiny bit of source.

> 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.

Hooray!

Oh, and i have yet to even *think* about optimizing ST4.

T


More information about the stringtemplate-interest mailing list