You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 1, 2023. It is now read-only.
As I was adding the Whiskers library I was a little surprised by the big gap between Swig and most other engines in the compile bench. In that step, Swig is calling the "fromString" method, which uses a cache if I'm not mistaken. This is a bit of an unfair comparison, since most of the other engines are actually compiling the template each time, not just grabbing it from a cache (not surprisingly, it looks like the other "fast" compiler, jqtpl, is also caching).
I tend to think of the render method as the proper place for caching, whereas I see compile as lower level. See how the two relate in the Whiskers code at https://github.com/gsf/whiskers.js/blob/master/lib/whiskers.js. Whether you agree with that philosophy or not, I still think the compile bench would be more interesting if it actually compared the compile speeds of the various template engines, and not just if they cache or not at that stage.
Lastly, I agree that any benchmarks in the realm of templating should be taken lightly. Thanks for the nice-looking comparison of node templates that you created, and for encouraging contributions.
As I was adding the Whiskers library I was a little surprised by the big gap between Swig and most other engines in the compile bench. In that step, Swig is calling the "fromString" method, which uses a cache if I'm not mistaken. This is a bit of an unfair comparison, since most of the other engines are actually compiling the template each time, not just grabbing it from a cache (not surprisingly, it looks like the other "fast" compiler, jqtpl, is also caching).
I tend to think of the render method as the proper place for caching, whereas I see compile as lower level. See how the two relate in the Whiskers code at https://github.com/gsf/whiskers.js/blob/master/lib/whiskers.js. Whether you agree with that philosophy or not, I still think the compile bench would be more interesting if it actually compared the compile speeds of the various template engines, and not just if they cache or not at that stage.
Lastly, I agree that any benchmarks in the realm of templating should be taken lightly. Thanks for the nice-looking comparison of node templates that you created, and for encouraging contributions.