Settings

Theme

Fixing Interface Erasure in Go

doxsey.net

2 points by cdoxsey 4 years ago · 2 comments

Reader

tomohawk 4 years ago

> 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/

  • cdoxseyOP 4 years ago

    Good catch. It seems like they implemented binary search, but not the jump tables yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection