Hacker News new | past | comments | ask | show | jobs | submit login

The compiler optimizes conversion from []byte to string on map lookup. https://github.com/golang/go/commit/f5f5a8b6209f84961687d993...



That’s awesome! I’ll have to benchmark that and see if I can delete some code now. Thanks.


It doesn't seem to do it in the general non-map, non-mutation case, though this optimization is welcome.

I've personally resorted to using `unsafe` trickery in tight loops to overcome this limitation.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: