-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use fstat instead of stat in libstd/fs.rs initial_buffer_size #47519
Comments
Quick microbenchmark which demonstrates the performance difference; it's not in Rust, but I believe it demonstrates the underlying idea here. Measured on macOS 10.13.2:
|
mbrubeck
added a commit
to mbrubeck/rust
that referenced
this issue
Jan 17, 2018
This replaces a `stat` syscall with `fstat` or similar, which can be faster. Fixes rust-lang#47519.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this issue
Jan 17, 2018
Use File::metadata instead of fs::metadata to choose buffer size This replaces a `stat` syscall with `fstat` or similar, which can be faster. Fixes rust-lang#47519.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Follow up to #47324. Instead of calling
stat
and thenopen
, doopen
and thenfstat
.In my tests on macOS this is significantly faster.
The text was updated successfully, but these errors were encountered: