Skip to content
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

Fix performance backlash of #74762 #75182

Closed
wants to merge 2 commits into from

Conversation

ssomers
Copy link
Contributor

@ssomers ssomers commented Aug 5, 2020

A small mistake had a measurable effect on performance. According to benchmarks, this turns #74762 into a petty speedup.

r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 5, 2020
@lcnr
Copy link
Contributor

lcnr commented Aug 5, 2020

@bors try @rust-timer queue

@bors
Copy link
Contributor

bors commented Aug 5, 2020

⌛ Trying commit c1c211a with merge 86d42ef9e3d641b4c17c285378d84d332de83d0b...

@bors
Copy link
Contributor

bors commented Aug 5, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: 86d42ef9e3d641b4c17c285378d84d332de83d0b (86d42ef9e3d641b4c17c285378d84d332de83d0b)

@lcnr
Copy link
Contributor

lcnr commented Aug 5, 2020

Looks like rust-timer didn't pick this up

@rust-timer build 86d42ef9e3d641b4c17c285378d84d332de83d0b

@rust-timer
Copy link
Collaborator

Queued 86d42ef9e3d641b4c17c285378d84d332de83d0b with parent 1d69e3b, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (86d42ef9e3d641b4c17c285378d84d332de83d0b): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never

@JohnTitor
Copy link
Member

Hm, it doesn't seem to recover the regression fully?

@ssomers
Copy link
Contributor Author

ssomers commented Aug 6, 2020

I have no idea what is being benchmarked here, and since how long, but here is another commit reverting everything that could have an effect.

@mati865
Copy link
Contributor

mati865 commented Aug 6, 2020

rust-timer measures performance of rustc compiling various crates. It doesn't run any of the benchmarks from the code.
Perf results in this case mean the changes from this PR made some code marginally easier to compile (it takes less work). Performance of Rust itself doesn't seem affected.

@ssomers
Copy link
Contributor Author

ssomers commented Aug 6, 2020

All I'm saying is that if #74762 caused this, then #68770 must have been much worse. Or in other words, if #74762 caused this, I can easily supply a 1% performance change for the better, simply stripping down a copy of remove_kv_tracking that snubs drain_filter. And I'm not saying that this code duplication is bad, because there is more to be gained if these two are no longer chained together.

@lqd
Copy link
Member

lqd commented Aug 6, 2020

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Aug 6, 2020

⌛ Trying commit 1794a79 with merge 7dfbeca825bc8cbbb586199f4511d2f8859aacfa...

@bors
Copy link
Contributor

bors commented Aug 6, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: 7dfbeca825bc8cbbb586199f4511d2f8859aacfa (7dfbeca825bc8cbbb586199f4511d2f8859aacfa)

@rust-timer
Copy link
Collaborator

Queued 7dfbeca825bc8cbbb586199f4511d2f8859aacfa with parent 0d75c91, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (7dfbeca825bc8cbbb586199f4511d2f8859aacfa): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never

@ssomers
Copy link
Contributor Author

ssomers commented Aug 7, 2020

The original regression in #75060 was alarmed about helloworld-check and neither of the commits here change that back. So can I conclude that #74762 was not the culprit? Then in my shallow view, the only other suspect is #75010.

@Mark-Simulacrum
Copy link
Member

Looking at the regression, it seems to be down to slightly more queries being run -- all metadata decoding. I'm not sure, but it does seem not implausible that the performance was affected by an extra struct or something odd like that. It's such a minor regression that I'm not too worried about tracking it down precisely -- #75010 seems like a plausible cause too.

@ssomers
Copy link
Contributor Author

ssomers commented Aug 7, 2020

Meanwhile, my small mistake fixed in the first commit here is superseded by #75257, so I think we're done here.

@ssomers ssomers closed this Aug 7, 2020
@ssomers ssomers deleted the btree_fix_74762 branch September 19, 2020 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants