diff options
Diffstat (limited to 'bench')
-rw-r--r-- | bench/throughput.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bench/throughput.js b/bench/throughput.js index 308446a..d27a94d 100644 --- a/bench/throughput.js +++ b/bench/throughput.js @@ -28,11 +28,13 @@ function makeSuite(bench, name, template, handlebarsOnly) { partials = template.partials, handlebarsOut, + compatOut, dustOut, ecoOut, mustacheOut; var handlebar = Handlebars.compile(template.handlebars, {data: false}), + compat = Handlebars.compile(template.handlebars, {data: false, compat: true}), options = {helpers: template.helpers}; _.each(template.partials && template.partials.handlebars, function(partial, name) { Handlebars.registerPartial(name, Handlebars.compile(partial, {data: false})); @@ -43,6 +45,11 @@ function makeSuite(bench, name, template, handlebarsOnly) { handlebar(context, options); }); + compatOut = compat(context, options); + bench("compat", function() { + compat(context, options); + }); + if (handlebarsOnly) { return; } @@ -107,6 +114,7 @@ function makeSuite(bench, name, template, handlebarsOnly) { } } + compare(compatOut, 'compat'); compare(dustOut, 'dust'); compare(ecoOut, 'eco'); compare(mustacheOut, 'mustache'); |