-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
cmd/compile: multiple performance regressions due to CL 270940, 448036, or 454036 #58166
Comments
For reference, here are the raw results from the runs immediate before and after the change. Before: https://perf.golang.org/search?q=upload%3A20230120.26+%7C+toolchain%3Abaseline+vs+toolchain%3Aexperiment The geomean change of time/op went from -1.24% before to -1.26%, so overall things seems slightly better, though I'm not sure this difference is statistically significant. |
I can't reproduce, at least for Is this linux/amd64? |
Ah, I think I need |
Old loop
New loop:
So #57976 is definitely in play, but there's also the |
Change https://go.dev/cl/463751 mentions this issue: |
That test runs as part of |
I just submitted a fix, at least for |
Looks like these are fixed:
These are not:
The last 2 are noisy enough that it is hard to be sure, though.
|
To be clear, I still (mostly) agree with your assessment @randall77. The only point I disagree on is |
Random slightly-related thought, Emery Berger and student had a project where they randomized things like load order so as to generate a more normal distribution of benchmark results, thus allowing you to compare actual means. Since, if we're doing build benchmarking, we compile and link more than once, we could add a random seed to the linker for symbol (package?) ordering, build multiple binaries and get some of that sweet sweet randomness. |
Looking a bit more at It is all due to Not really clear yet what about this is affected by the different schedule. I'll see if any tweaks could make it a bit better. |
Several theories discarded. |
When scheduling a block, deprioritize values whose results aren't used until subsequent blocks. For golang#58166, this has the effect of pushing the induction variable increment to the end of the block, past all the other uses of the pre-incremented value. Do this only with optimizations on. Debuggers have a preference for values in source code order, which this CL can degrade. Fixes golang#58166 Fixes golang#57976 Change-Id: I40d5885c661b142443c6d4702294c8abe8026c4f Reviewed-on: https://go-review.googlesource.com/c/go/+/463751 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
#58534 should reduce the targets left in this issue to MTFT and Hash8k. |
The performance dashboard shows several regressions with the same culprit. Look for entries that say "change at fc81405".
Digging further, there are actually three commits between the previous good run and the bad run:
https://go.googlesource.com/go/+log/b419db6c15519a29ff3d7d2e56d8f115204f8c5d..fc814056aae191f61f46bef5be6e29ee3dc09b89
My gut says that the scheduling pass CL is most likely to cause regressions (cc @randall77).
The full set of regressions I see:
v0.9.3
v0.0.0-20180603041446-333f0593be06
v0.9.3
v1.9.0
v1.10.9
cc @golang/compiler
The text was updated successfully, but these errors were encountered: