Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added .compile() to benchmarks

  • Loading branch information...
commit 6373739da02c7b0a9aa5c71b957761b2491c257a 1 parent 1a72378
@tj tj authored
Showing with 9 additions and 0 deletions.
  1. +9 −0 benchmarks/jade.js
View
9 benchmarks/jade.js
@@ -8,6 +8,7 @@ var bm = require('./common'),
fs = require('fs');
var str = fs.readFileSync(__dirname + '/example.jade', 'ascii');
+var fn = jade.compile(str);
var n = bm.times;
bm.start('jade compilation');
@@ -29,4 +30,12 @@ while (n--) {
locals: bm.locals
});
}
+bm.stop();
+
+var n = bm.times;
+
+bm.start('jade compile()');
+while (n--) {
+ fn(bm.locals);
+}
bm.stop();
Please sign in to comment.
Something went wrong with that request. Please try again.