Skip to content

fs: improve error performance for `writeSync`

Rodrigo Muino Tomonari requested to merge github/fork/pluris/feat/write_sync into main

I worked on it because it seemed like there was still work left to do in https://github.com/nodejs/performance/issues/106.

                                              confidence improvement accuracy (*)    (**)   (***)
fs/bench-writeSync.js n=100000 type='invalid'        ***    116.41 %       ±9.35% ±12.49% ±16.36%
fs/bench-writeSync.js n=100000 type='valid'                   0.46 %       ±6.13%  ±8.16% ±10.62%

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