Skip to content

Instantly share code, notes, and snippets.

@yukidarake
Created December 8, 2011 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukidarake/1445883 to your computer and use it in GitHub Desktop.
Save yukidarake/1445883 to your computer and use it in GitHub Desktop.
process.nextTickのパフォーマンスを計測
var count = 0;
function countUp() {
count++;
process.nextTick(countUp);
}
countUp();
setInterval(function() {
var c = count;
count = 0;
console.log(c + ' count/s, ' + parseInt(c / 1000) + ' tick/ms');
}, 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment