What is the fastest template system for Python?

前端 未结 5 1042
余生分开走
余生分开走 2020-12-07 08:43

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 ?

5条回答
  •  伪装坚强ぢ
    2020-12-07 09:18

    If you can throw caching in the mix (like memcached) then choose based on features and ease of use rather than optimization.

    I use Mako because I like the syntax and features. Fortunately it is one of the fastest as well.

提交回复
热议问题