4 ms·
If you look near the end of the line for each result, that % value is the margin of error. > readFileP x 2,182 ops/sec ±4.00% (67 runs sampled) This means re
by Jarred 6y ago
If you look near the end of the line for each result, that % value is the margin of error.
> readFileP x 2,182 ops/sec ±4.00% (67 runs sampled)
This means readFileP took between 2,094 and 2,270 ops/second.
> fs.readFile x 2,045 ops/sec ±6.43%
This means fs.readFile took between 1,913 and 2,176 ops/second.
So its possible it did run faster, but it's also possible it ran slower. You'd probably need to run it a lot more times to have an answer.
- anonytrary 6y agoI agree, the error in their claimed deviation isn't accurate. You would need to run many trials across many devices at different times of the day for a practical benchmark; it could be a service itself. I do think the data here is enough to know that a promise wrapper here is insignificant in the grand scheme of things. This fs.promises library must do way more under the hood.