Permalink
Browse files

added .compile() to benchmarks

  • Loading branch information...
1 parent 1a72378 commit 6373739da02c7b0a9aa5c71b957761b2491c257a Tj Holowaychuk committed Nov 20, 2010
Showing with 9 additions and 0 deletions.
  1. +9 −0 benchmarks/jade.js
View
@@ -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();

0 comments on commit 6373739

Please sign in to comment.