Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.19.2 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What did you do?
https://go.dev/play/p/LSrP_ch-8f1
What did you expect to see?
Both f1() & f2() to utilize jump table optimization, as both functions are functionally identical.
What did you see instead?
f1() uses jump table optimization as it has 8 distinct case clauses.
f2() reverts to a chain of comparisons.