node/benchmark/fs
Anna Henningsen 5c93aab278
fs: buffer dir entries in opendir()
Read up to 32 directory entries in one batch when `dir.readSync()`
or `dir.read()` are called.

This increases performance significantly, although it introduces
quite a bit of edge case complexity.

                                                                 confidence improvement accuracy (*)    (**)    (***)
     fs/bench-opendir.js mode='async' dir='lib' n=100                  ***    155.93 %      ±30.05% ±40.34%  ±53.21%
     fs/bench-opendir.js mode='async' dir='test/parallel' n=100        ***    479.65 %      ±56.81% ±76.47% ±101.32%
     fs/bench-opendir.js mode='sync' dir='lib' n=100                           10.38 %      ±14.39% ±19.16%  ±24.96%
     fs/bench-opendir.js mode='sync' dir='test/parallel' n=100         ***     63.13 %      ±12.84% ±17.18%  ±22.58%

PR-URL: https://github.com/nodejs/node/pull/29893
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2019-10-11 23:09:39 +02:00
..
bench-mkdirp.js
bench-opendir.js fs: buffer dir entries in opendir() 2019-10-11 23:09:39 +02:00
bench-readdir.js benchmark: refactor for consistent style 2019-02-06 22:18:31 -08:00
bench-readdirSync.js benchmark: add dir and withFileTypes option readdir benchmarks 2018-11-08 15:01:14 -08:00
bench-realpath.js benchmark: refactor for consistent style 2019-02-06 22:18:31 -08:00
bench-realpathSync.js
bench-stat-promise.js
bench-stat.js benchmark: refactor for consistent style 2019-02-06 22:18:31 -08:00
bench-statSync.js
read-stream-throughput.js benchmark: use test/common/tmpdir consistently 2019-08-10 19:21:35 -07:00
readFileSync.js
readfile-partitioned.js benchmark,lib: change var to const 2019-03-30 13:16:39 +01:00
readfile.js benchmark: use test/common/tmpdir consistently 2019-08-10 19:21:35 -07:00
write-stream-throughput.js benchmark: use test/common/tmpdir consistently 2019-08-10 19:21:35 -07:00