cmd/compile: Benchmarks ordering problem with generics #52002
Labels
FrozenDueToAge
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
)?What did you do?
Benchmarks code: https://go.dev/play/p/zNLHtksAcAS
If we run the test twice in a different order of execution of benchmarks, we will get an interesting dependency.
All subsequent code after generics degrades performance.
With this flags, performance both generics and non-generics becomes around
~600ns ns/op
go test -bench=. -count=2 -gcflags=all=-d=unified
What did you expect to see?
In general, I expected to see the same performance of both generic and non-generic code, but I was amazed by the behavior of the order of benchmarks.
end
The text was updated successfully, but these errors were encountered: