aboutsummaryrefslogtreecommitdiff
path: root/src/InternPool.zig
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2022-10-05 16:05:02 -0700
committerRyan Liptak <squeek502@hotmail.com>2022-10-05 16:05:02 -0700
commit39f192d54eba99ba3dfc7066476912633e694d51 (patch)
treeca8f102cbcac4bd7c9a21207f0eae8db3135e9bb /src/InternPool.zig
parent274d19575ea1ebaea593cdca7c5afa8303153cb4 (diff)
downloadzig-39f192d54eba99ba3dfc7066476912633e694d51.tar.gz
zig-39f192d54eba99ba3dfc7066476912633e694d51.zip
fs: Reduce IterableDir.Iterator `buf` size to 1024
This was sized large so that `getdents` (and other platforms' equivalents) could provide large amounts of entries per syscall, but some benchmarking seems to indicate that the larger 8192 sizing doesn't actually lead to performance gains outside of edge cases like extremely large amounts of entries within a single directory (e.g. 25,000 files in one directory), and even then the gains are minimal ('./walk-8192 dir-with-tons-of-entries' ran 1.02 ± 0.34 times faster than './walk-1024 dir-with-tons-of-entries'). Note: Sizes 1024 and 2048 had similar performance characteristics, so the smaller of the two was chosen.
Diffstat (limited to 'src/InternPool.zig')
0 files changed, 0 insertions, 0 deletions