-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 custom implementation of read_buf in Read for &'a FileDesc #108235
Conversation
This allows to skip an unnecessary buffer initialization.
(rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Have you measured this properly? The linked issue only gives a single-shot benchmark that involves process spawning, that seems quite noisy (e.g. numbers vary 10x on the playground). |
The problem in #108223 is that Command uses non-blocking IO and The test case is of course racy, but the difference is easy measurable on my system. |
This solves a real issue and is simple enough. Doing additional optimizations as a followup is fine @bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (824f915): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. |
This allows to skip an unnecessary buffer initialization.
Fixes #108223.