Skip to content

Instantly share code, notes, and snippets.

@chakrit
Created July 5, 2012 08:32
Show Gist options
  • Save chakrit/3052285 to your computer and use it in GitHub Desktop.
Save chakrit/3052285 to your computer and use it in GitHub Desktop.
var i = 0;
for (; i < 10000000; i++)
process.nextTick(function() { });
var i = 0;
for (; i < 10000000; i++)
{ var x = i = i; }
var i = 0;
for (; i < 10000000; i++)
(function() { })();
var i = 0
, func = function() { };
for (; i < 10000000; i++)
(func)();
@chakrit
Copy link
Author

chakrit commented Jul 5, 2012

$ 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