Created
January 2, 2012 04:21
-
-
Save heapwolf/1549335 to your computer and use it in GitHub Desktop.
Math.abs() performance
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
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 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 substack@gmail.com -sSNT abs.js testling.com | |
Enter host password for user 'substack@gmail.com': | |
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