参照博客的各个模板引擎运行程序的测试数据,小结一下。
这里有:artTemplate (腾讯)、juicer(淘宝)、doT、Handlebars、tmpl、easyTemplate、underscoreTemplate、baiduTemplate(百度)、Mustache、kissyTemplate等模板引擎,各项数据对比如下,仅供参考:
各浏览器渲染竞赛
100条数据*10000次渲染测试
- ie8浏览器

- chrome浏览器

- Apple safari浏览器

- firefox浏览器

- 奇虎360浏览器

测试结果对比

通过对各模板引擎测试结果,可以看出artTemplate,juicer与doT引擎模板整体性能要有绝对优势;
其中doT引擎模板在IE与safari浏览器表现非常优越;tmpl模板引擎在IE中运行能完美胜出,但在其它浏览器中表现就差很多;
延伸:通过对模板引擎的熟知,不同浏览器渲染能力也不一样;渲染快的打开网页速度就快;chrome与360浏览器打开速是最快的;ie浏览器的速度是最慢;
网友评论