cmd/compile: suboptimal code generation for bit test (regression in Go 1.15) #44228
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Performance
Milestone
What version of Go are you using (
go version
)?Go 1.15.8 and tip
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?linux/amd64
We're upgrading from an old Go version (1.13.x) to Go 1.15 and I'm looking at a noticeable benchmark regression.
Here's a repro:
https://github.com/cespare/misc/blob/00c5f6e9852290b26ea32fc437c69eaa47fe63dd/btregression/btregression.go
The interesting bit is simply
It just does a lookup in a small global bitset.
On my machine (i7-8700K), here's the benchmark results comparing Go 1.14.15 and Go 1.15.8:
The results are similar on tip.
The generated code used to use a
BT
instruction, but now it uses a longer sequence instead.Go 1.14.15:
Go 1.15.8
I bisected the change back to 98cb767 (CL 217097).
/cc @randall77 @josharian
The text was updated successfully, but these errors were encountered: