Created
January 2, 2012 13:54
-
-
Save 0xGGGGG/1550764 to your computer and use it in GitHub Desktop.
Math.abs() performance
This file contains hidden or 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
var test = require('testling'); | |
test('Math.abs performance', function (t) { | |
var t0 = new Date; | |
for (var i = 0; i < 100 * 1000; i++) Math.abs(i - 50 * 1000) | |
t.log(new Date - t0); | |
t.end(); | |
}); |
This file contains hidden or 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
$ curl -u [email protected] -sSNT abs.js testling.com | |
Enter host password for user '[email protected]': | |
Bundling... done | |
iexplore/7.0 0/0 0 % ok | |
Log: 3000 | |
iexplore/8.0 0/0 0 % ok | |
Log: 1578 | |
iexplore/9.0 0/0 0 % ok | |
Log: 365 | |
chrome/15.0 0/0 0 % ok | |
Log: 57 | |
firefox/7.0 0/0 0 % ok | |
Log: 158 | |
opera/11.5 0/0 0 % ok | |
Log: 166 | |
safari/5.1 0/0 0 % ok | |
Log: 176 | |
total 0/0 0 % ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment