What is the fastest template system for Python?
问题 Jinja2 and Mako are both apparently pretty fast. How do these compare to (the less featured but probably good enough for what I'm doing) string.Template ? 回答1: Here are the results of the popular template engines for rendering a 10x1000 HTML table. Python 2.6.2 on a 3GHz Intel Core 2 Kid template 696.89 ms Kid template + cElementTree 649.88 ms Genshi template + tag builder 431.01 ms Genshi tag builder 389.39 ms Django template 352.68 ms Genshi template 266.35 ms ElementTree 180.06 ms