[stringtemplate-interest] Stringtemplate performances : some figures

Terence Parr parrt at cs.usfca.edu
Sun Mar 1 12:24:49 PST 2009


On Mar 1, 2009, at 12:16 PM, Mathieu Clabaut wrote:

> Hello,
>
>  I was in the process on doing a prototype in python to validate the  
> use of template engine for some export task inside the Rodin  
> Platform (http://wiki.event-b.org).
>  I was quite disappointed stringtemplate performances in python: The  
> export of a (quite big) model took 49,7 seconds.
>  So I tried Mako which is reputed to be quite fast (albeit 3 times  
> slower than tenjin : http://www.kuwata-lab.com/tenjin/), and I get  
> the same result (Same overhead outside of template generation, and  
> very similar template) in 8,7s.
>
>  This led to two questions:
>  - Do you know of some ways to improve strigtemplate performances ?

The biggest thing I remember about previous versions is that they did  
a deep copy instead of a pointer copy when they did set attribute  
stuff. I understand that that has been fixed, what version are you  
using?

>  - Are java stringtemplate performances better, or quite the same  
> than those of python (I didn't find any benchmark with  
> Stringtemplate on the net) ?

Java should go much faster.

Ter


More information about the stringtemplate-interest mailing list