-
-
Save chakrit/3052285 to your computer and use it in GitHub Desktop.
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 i = 0; | |
for (; i < 10000000; i++) | |
process.nextTick(function() { }); |
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 i = 0; | |
for (; i < 10000000; i++) | |
{ var x = i = i; } |
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 i = 0; | |
for (; i < 10000000; i++) | |
(function() { })(); |
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 i = 0 | |
, func = function() { }; | |
for (; i < 10000000; i++) | |
(func)(); |
$ time node d.js && time node d.js && time node d.js
node d.js 0.11s user 0.01s system 99% cpu 0.123 total
node d.js 0.11s user 0.01s system 98% cpu 0.119 total
node d.js 0.11s user 0.01s system 99% cpu 0.119 total
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$ time node a.js && time node b.js && time node c.js && time node a.js && time node b.js && time node c.js
node a.js 3.87s user 0.68s system 101% cpu 4.477 total
node b.js 0.05s user 0.01s system 95% cpu 0.060 total
node c.js 0.17s user 0.01s system 99% cpu 0.176 total
node a.js 3.91s user 0.67s system 103% cpu 4.450 total
node b.js 0.05s user 0.01s system 98% cpu 0.057 total
node c.js 0.17s user 0.01s system 99% cpu 0.176 total