Skip to content

Instantly share code, notes, and snippets.

@tricknotes
Last active December 10, 2015 05:48
Show Gist options
  • Save tricknotes/4389641 to your computer and use it in GitHub Desktop.
Save tricknotes/4389641 to your computer and use it in GitHub Desktop.
var Readable = require('stream').Readable;
var i, now, count = 1000000;
var source = Readable.toString().split('\n')[9];
now = Date.now();
for (i = 0; i < count; i++) {
new Readable();
}
console.log('* %s - %d ms', source, Date.now() - now);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment