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

cmd/compile: aggressive IMUL rewrites on AMD64 sometimes lead to performance regressions #25358

Open
quasilyte opened this issue May 11, 2018 · 3 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Performance
Milestone

Comments

@quasilyte
Copy link
Contributor

quasilyte commented May 11, 2018

image/draw

name        old time/op  new time/op  delta
CopyOver-4  1.18ms ± 0%  1.52ms ± 0%  +28.49%  (p=0.008 n=5+5)

Bisecting from tip leads to b1df8d6.
This is regression from go1.10.2.
Performance delta is shown for b1df8d6 itself and it's parent (previous commit).

Single IMUL is rewritten into mov+shift+lea.
I can't reliably reproduce those results in free context, but they're stable for CopyOver.

@quasilyte quasilyte changed the title cmd/compile: aggressive IMUL rewrites sometimes lead to performance regressions cmd/compile: aggressive IMUL rewrites on AMD64 sometimes lead to performance regressions May 11, 2018
@josharian
Copy link
Contributor

Duplicate of #21735?

@quasilyte
Copy link
Contributor Author

quasilyte commented May 11, 2018

Maybe.

I'm reporting regression and it hopefully can be fixed.
Shouldn't be unnoticed.

At the very least it adds related benchmark that can be used to check the results.

@bradfitz
Copy link
Contributor

/cc @randall77

@bradfitz bradfitz added Performance NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels May 11, 2018
@bradfitz bradfitz modified the milestones: Go1.11, Unplanned May 11, 2018
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Performance
Projects
None yet
Development

No branches or pull requests

4 participants