Fixing Interface Erasure in Go
doxsey.net
Fixing Interface Erasure in Go
1–3 of 3 posts
Re: Fixing Interface Erasure in Go
#2> We can use a switch with an integer which Go can optimize into a jump table.
I wasn't aware that golang switch statements were ever turned into jump tables. But then again, maybe they will be soon?
Re: Fixing Interface Erasure in Go
#3> We can use a switch with an integer which Go can optimize into a jump table. I wasn't aware that golang switch statements were ever turned into jump tables. But then again, maybe they will be soon? https://go-review.googlesource.com/c/go/+/357330/
Good catch. It seems like they implemented binary search, but not the jump tables yet.