-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Avoid zeroing large stack buffers in stdio on Windows #101193
Conversation
55c0220
to
2f9bd1a
Compare
CI is green on windows (https://github.com/rust-lang/rust/runs/8089709575?check_suite_focus=true and https://github.com/rust-lang/rust/runs/8089709693?check_suite_focus=true), so I dropped the CI edit commit, and this should be reviewable. (edit: this is why I removed the t-infra label -- it was only here because I wanted to add windows to the CI temporarily) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Just a couple of things
@bors r+ rollup |
…nton Avoid zeroing large stack buffers in stdio on Windows Does what it says on the tin, using `[MaybeUninit<u16>; N]` instead of `[0u16; N]`. These buffers seem to be around 8kb, which is big enough that this is likely to be a very nice perf boost to stdio-heavy windows code. r? `@ChrisDenton` *(Note: this PR also has a commit that adds windows to CI, but as it mentions I'll revert that after it comes out green -- I can only do a check build on the machine I'm typing this on)*
Rollup of 10 pull requests Successful merges: - rust-lang#100804 (Fix search results color on hover for ayu theme) - rust-lang#100892 (Add `AsFd` implementations for stdio types on WASI.) - rust-lang#100927 (Adding new Fuchsia rustup docs... reworking walkthrough) - rust-lang#101088 (Set DebuginfoKind::Pdb in msvc_base) - rust-lang#101159 (add tracking issue number to const_slice_split_at_not_mut) - rust-lang#101192 (Remove path string) - rust-lang#101193 (Avoid zeroing large stack buffers in stdio on Windows) - rust-lang#101197 (:arrow_up: rust-analyzer) - rust-lang#101200 (Add test for issue rust-lang#85872) - rust-lang#101219 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Avoid needless buffer zeroing in `std::sys::windows::fs` Followup to rust-lang#101171 and rust-lang#101193. This finishes up avoiding buffer zeroing pointed out in rust-lang#100729 (comment) (thanks!) r? `@ChrisDenton`
Avoid needless buffer zeroing in `std::sys::windows::fs` Followup to rust-lang/rust#101171 and rust-lang/rust#101193. This finishes up avoiding buffer zeroing pointed out in rust-lang/rust#100729 (comment) (thanks!) r? `@ChrisDenton`
Does what it says on the tin, using
[MaybeUninit<u16>; N]
instead of[0u16; N]
. These buffers seem to be around 8kb, which is big enough that this is likely to be a very nice perf boost to stdio-heavy windows code.r? @ChrisDenton
(Note: this PR also has a commit that adds windows to CI, but as it mentions I'll revert that after it comes out green -- I can only do a check build on the machine I'm typing this on)