diff --git a/benchmark/index.html b/benchmark/index.html
index 529cd90..ce8191f 100644
--- a/benchmark/index.html
+++ b/benchmark/index.html
@@ -69,16 +69,18 @@
-
Targets: Dust, Handlebars, Mustache, jquery-tmpl. Each benchmark runs once using an adaptive test cycles algorithm similar to the one found in jslitmus.
+
Targets: Dust, Handlebars, Mustache, jquery-tmpl, Underscore. Each benchmark runs once using an adaptive test cycles algorithm similar to the one found in jslitmus.
-
+
+
+
@@ -135,6 +137,7 @@ The list is empty.
\n" +
+ "<% } %>",
+ context: {
+ header: function() {
+ return "Colors";
+ },
+ items: [
+ {name: "red", current: true, url: "#Red"},
+ {name: "green", current: false, url: "#Green"},
+ {name: "blue", current: false, url: "#Blue"}
+ ],
+ hasItems: function(ctx) {
+ return ctx.items.length ? true : false;
+ }
+ }
+ }
+
+};
+
+exports.underscoreBench = function(suite, name, id) {
+ var bench = benches[name],
+ fn = _.template(bench.source),
+ ctx = bench.context,
+ partials = {};
+
+ if (bench.partials) {
+ for (var key in bench.partials) {
+ partials[key] = _.template(bench.partials[key]);
+ }
+ }
+
+ ctx.partials = partials;
+
+ suite.bench(id || name, function(next) {
+ fn(ctx);
+ next();
+ });
+};
+
+exports.underscoreBench.benches = benches;
+
+})(typeof exports !== "undefined" ? exports : window);