最近作了JS模板引擎测试,拿各个JS模板引擎在不一样浏览器上去运行同一程序,下面是模板引擎测试数据;经过测试artTemplate、juicer与doT引擎模板总体性能要有绝对优点;前端
引擎渲染速度竞赛jquery
100 条数据 × 10000 次渲染测试 [isEscape:false, isCache:true]ios
ie8浏览器(8.0.6001.18702)git
chrome浏览器(版本 26.0.1410.64 m)程序员
Apple safari浏览器(5.1.7(7534.57.2))github
firefox浏览器(19.0.2)chrome
奇虎360浏览器(版本号6.1.0.356,内核版本:21.0.1180.89)浏览器
经过对各模板引擎测试结果,能够看出
artTemplate,juicer与doT引擎模板总体性能要有绝对优点;
其中doT引擎模板在IE与safari浏览器表现很是优越;
tmpl模板引擎在IE中运行能完美胜出,但在其它浏览器中表现就差不少;
延伸
经过对模板引擎的熟知,不一样浏览器渲染能力也不同;渲染快的打开网页速度就快;chrome与360浏览器打开速是最快的;ie浏览器的速度是最慢;性能
baiduTemplate: http://baidufe.github.io/BaiduTemplate/测试
artTemplate: https://github.com/aui/artTemplate
juicer: http://juicer.name/或https://github.com/PaulGuo/Juicer/zipball/master#download
doT:doT source:https://github.com/olado/doT Docs:http://olado.github.com/doT/
tmpl:https://github.com/BorisMoore/jquery-tmpl
handlebars:http://handlebarsjs.com/或https://raw.github.com/wycats/handlebars.js/1.0.0-rc.4/dist/handlebars.js
easyTemplate:https://github.com/qitupstudios/easyTemplate
underscoretemplate: http://documentcloud.github.io/underscore/
mustache:https://github.com/janl/mustache.js
kissytemplate:https://github.com/ktmud/kissy
相关引擎资料
转载自:http://blog.csdn.net/wuchengzhi82/article/details/8938122
程序员的基础教程:菜鸟程序员