-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Inline Duration construction into Duration::from_{secs,millis,micros,nanos}
#125232
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
Conversation
I prefer this change for clarity even if there is no performance impact. I don't foresee a negative performance change from this, so I'm going to merge it. @bors r+ rollup=iffy |
☀️ Test successful - checks-actions |
Finished benchmarking commit (94be5ab): 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)Results (primary -6.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary 1.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary -0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 668.38s -> 668.437s (0.01%) |
The millis/micros/nanos cases I don't feel as strongly about, but I see no reason why
Duration::from_secs
should call intoDuration::new
- that's just creating unnecessary work for the inlining and DCE passes.