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
strings: IndexAny performance regression vs 1.9 #22750
Comments
cc @randall77 |
https://go-review.googlesource.com/78112 (2a166c9) might be of interest regarding c82ee79 |
I'm confused. There is a load in the inner loop that could be lifted, but that's there in 1.9.2 also. |
Turns out I was used slightly outdated version of master (ef0e2af), before 2a166c9. As @tklauser has mentioned 2a166c9 reverts c82ee79 which causes code to also revert to 1.9 state. Also I've tested suggestion from #22234 (I've commented loop.containsCall part) and it removes both loads from the loop, even for pre 2a166c9 version of IndexAny |
Ok, I'll close this issue then. |
What version of Go are you using (go version)?
What operating system and processor architecture are you using (go env)?
/proc/cpuinfo:
model name : Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz
What did you do?
Compared strings/IndexAnyASCII/1 performance to 1.9 and found regression.
It is most prominent on ndexAnyASCII/1:4 subbenchmark, but others also show this regression.
src/strings/IndexAnyASCII/1:4 15.0ns ± 0% 17.1ns ± 0% +14.00% (p=0.000 n=8+8)
Bisect points to c82ee79 and b78b54f
b78b54f looks mostly unrelated, but
c82ee79 changes generated code of IndexAny.
Removing useless check makes sense to me, but it also caused changes inside main loop.
Main problem that I see is an extra LoadReg in a loop.
It is placed there by regalloc pass.
The text was updated successfully, but these errors were encountered: