Nice, but is the templating engine really the bottleneck for your application? And if not, does it really matter that this implementation is 40 times faster?
http://tomayko.com/writings/ruby-markdown-libraries-real-che...
In Python land, there have huge improvements in template engines [3]. And they are not done; Jinja(2) author, Armin Ronacher, is working on a Google Summer of Code (GSoC) project [4] to speed up Django and Jinja2 templates.
[1] http://googleresearch.blogspot.com/2009/06/speed-matters.htm...
[2] http://glinden.blogspot.com/2006/11/marissa-mayer-at-web-20....
[3] http://stackoverflow.com/questions/1324238/what-is-the-faste...