FWIW, I also don't see any appreciable difference:
goos: windows
goarch: amd64
BenchmarkStateSet1-4 1368303 872 ns/op
BenchmarkStateSet2-4 1379320 887 ns/op
BenchmarkStateSet3-4 1343781 865 ns/op
PASS
ok command-line-arguments 7.446s
On
That's interesting!
My numbers earlier were from an AMD chip (2990WX) on Linux 5.3.11.
On an older Intel chip (i7-4960HQ) on macOS 10.15.3 I still see small a
difference but it's much smaller.
$ go test -bench .
goos: darwin
goarch: amd64
BenchmarkStateSet1-82737468 441 ns/op
maybe it's just your system?
master ยป gotip test -bench .
goos: linux
goarch: amd64
pkg: testrepo-75
BenchmarkStateSet1-44173546 273 ns/op
BenchmarkStateSet2-44547119 261 ns/op
BenchmarkStateSet3-44556757 263 ns/op
PASS
ok testrepo-75 4.899s
On Monday, February 2