-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: unexpected benchmark results #64328
Comments
I am not able to reproduce:
Using:
|
@go101 could you please run 30 interleaved benchmarks and |
How to do it interleavely? I didn't find the option. (My laptop is always in charging.) |
|
|
Perhaps if you manually change |
@aimuz this is not interleaved, it does not help against bias that would randomly start or stop in the benchmark. @go101 you need to either use for i in $(seq 30); do go test -bench=. file_test.go >> results; done |
I don't get it. Should the |
Checked the results of
A |
CC @golang/compiler |
Many intel processors are sensitive to loop alignment; if the target of a loop is not aligned properly, this can cause slowdowns; this could be what's happening here. The specific rules are processor specific, to make things more complicated. Suggestion: try doing this to gather more info:
You can then compare the two to see if anything jumps out in terms of specific instructions taking more cycles. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What did you do?
What did you expect to see?
Similar performance for the specified test case.
What did you see instead?
Benchmark result shows
CompactFunc_2
is (about 15%) slower, which is quite confusing.The text was updated successfully, but these errors were encountered: