DEV Community


Discussion on: My journey optimizing the Go Compiler

segflow profile image
Assel Meher Author • Edited

That's the function used the benchmark the single lookup using a const literal on a literal map, and compared to the switch one yes it's 96 slower, of course, I'm talking slower on my MAC.
I already said, that optimizing that is somewhat unnecessary. But with that PR that function becomes similar to a func mapImplementation () int { return 0 }. This means there is no map allocation at all.