cmd/compile: Iterating a slice backwards is a tiny bit faster than forwards #35140
Labels
FrozenDueToAge
Performance
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Need to try.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
I figured the second and third benchmarks would be about the same
What did you see instead?
Going through the array in reverse is consistently a tiny bit faster. Is this just a quirk of my CPU architecture? I tried switching it around a little to use 1 instead of 0 for the comparison and that narrowed the gap slightly but in reverse was still consistently faster.
The text was updated successfully, but these errors were encountered: