Hacker News new | ask | show | jobs
by morelisp 1553 days ago
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/