Created
October 19, 2016 13:02
-
-
Save mafintosh/c148f4b3eca87846eade85d0d876a570 to your computer and use it in GitHub Desktop.
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 fs = require('fs') | |
for (var i = 0; i < 10000; i++) { | |
printLength(__filename) | |
} | |
function printLength (filename) { | |
fs.readFile(filename, foo) | |
function foo (err, buf) { | |
if (err) return // ignore error - probably just too many fds | |
console.error(filename + ' has length ' + buf.length) | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, I (slightly) adapted this test for a micro benchmark. It just got a massive bump (7 times faster) on V8 master (We sped this up a while ago but behind a flag, flag is on by default now).
This should be in the V8-Node integration build in a few hours. I'll retry on the original Node example then.