-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Avoid getting dep_dep_node
unnecessarily.
#147293
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
base: master
Are you sure you want to change the base?
Conversation
It's gotten on a hot path but only for use within `debug!`.
They both have a single use. (They can't be united, though, because `self.colors` might change between the two `get` calls.)
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Avoid getting `dep_dep_node` unnecessarily.
This comment has been minimized.
This comment has been minimized.
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.
Change seems obviously good, since it avoids a function call on both Some branches of the match, which only need the result for debugging information.
I have no idea of the potential performance impact of this, but I'm curious to see the results of the perf run.
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (7b6fbc1): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary -2.8%, secondary -2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 472.69s -> 471.95s (-0.16%) |
The icount results were almost twice as good as what I saw locally. And there are even some green cycle count results, which is nice, and uncommon for a micro-optimization like this. There are a few double-digit wall-time regressions, but only among secondary benchmarks, and only among the really short-running ones, which appear to be prone to large swings with some frequency; the change is so simple that I think they can be ignored. r? @saethlin |
r? @ghost