aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/spirv/Section.zig
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2023-06-07 22:37:53 -0700
committerRyan Liptak <squeek502@hotmail.com>2023-06-08 02:16:15 -0700
commit2f188290e203780752597b0263581590af3a69b2 (patch)
treeebab0d11aa6a249ef05337725f57d868e848a75c /src/codegen/spirv/Section.zig
parent00ff65357666a7ec161d6e80c92be2ccc79e3638 (diff)
downloadzig-2f188290e203780752597b0263581590af3a69b2.tar.gz
zig-2f188290e203780752597b0263581590af3a69b2.zip
Use `iterateAssumeFirstIteration` in `Walker.next` to avoid unnecessary lseek calls
Since we are opening each directory for iteration, we know that we don't need to reset the cursor's directory before iterating. Using `iterateAssumeFirstIteration` skips the cursor resetting which eliminates an `lseek` syscall for every directory opened on non-Windows platforms. This doesn't seem to actually matter much for performance (1.01 ± 0.02 times faster when walking /home/ on my system) but avoiding unnecessary syscalls is always nice anyway.
Diffstat (limited to 'src/codegen/spirv/Section.zig')
0 files changed, 0 insertions, 0 deletions