forked from pugjs/pug
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added my old haml.js to the benchmarks
Jade needs some optimization :)
- Loading branch information
Showing
6 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
%ul | ||
%li!= one | ||
%li!= two | ||
%li!= three | ||
- each item in items | ||
%li!= item |
Submodule haml
added at
382bc1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
/** | ||
* Module dependencies. | ||
*/ | ||
|
||
var bm = require('./common'), | ||
haml = require('./haml/lib/haml'), | ||
fs = require('fs'); | ||
|
||
var str = fs.readFileSync(__dirname + '/example2.haml', 'ascii'); | ||
|
||
var n = bm.times; | ||
bm.start('haml compilation'); | ||
while (n--) { | ||
haml.render(str, { | ||
locals: bm.locals | ||
}); | ||
} | ||
bm.stop(); | ||
|
||
var n = bm.times; | ||
bm.start('haml execution'); | ||
while (n--) { | ||
haml.render(str, { | ||
locals: bm.locals, | ||
cache: true, | ||
filename: 'example2.haml' | ||
}); | ||
} | ||
bm.stop(); |