diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2023-06-07 22:37:53 -0700 |
|---|---|---|
| committer | Ryan Liptak <squeek502@hotmail.com> | 2023-06-08 02:16:15 -0700 |
| commit | 2f188290e203780752597b0263581590af3a69b2 (patch) | |
| tree | ebab0d11aa6a249ef05337725f57d868e848a75c /src/codegen/spirv | |
| parent | 00ff65357666a7ec161d6e80c92be2ccc79e3638 (diff) | |
| download | zig-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')
0 files changed, 0 insertions, 0 deletions
