Re:Go 1.18
by morelisp on Wednesday March 16, 2022 @07:38AM
(#30697570)
Go currently uses a binary search for integer switches (and I believe serial comparisons otherwise). Jump tables are in development and likely to appear around 1.19 or 1.20. As you say, there's a lot of edge cases to consider when figuring out whether a table or comparisons are the better choice.
https://go-review.googlesource.com/c/go/+/357330/