Skip to content

fs: improve error performance for `readSync`

Rodrigo Muino Tomonari requested to merge github/fork/pluris/perf/readsync into main
  • fs.readSync(fd, buffer, offset, length[, position])
  • fs.readSync(fd, buffer[, options])
                                                 confidence improvement accuracy (*)    (**)   (***)
fs/bench-readSync.js n=10000 type='existing'                     3.73 %       ±6.45%  ±8.58% ±11.17%
fs/bench-readSync.js n=10000 type='non-existing'        ***     84.98 %      ±10.30% ±13.80% ±18.14%

Be aware that when doing many comparisons the risk of a false-positive result increases.
In this case, there are 2 comparisons, you can thus expect the following amount of false-positive results:
  0.10 false positives, when considering a   5% risk acceptance (*, **, ***),
  0.02 false positives, when considering a   1% risk acceptance (**, ***),
  0.00 false positives, when considering a 0.1% risk acceptance (***)

Refs: https://github.com/nodejs/performance/issues/106

Merge request reports

Loading