gitalk
gitalk copied to clipboard
四种字符串和bytes互相转换方式的性能比较
四种字符串和bytes互相转换方式的性能比较
昨天公司群中同事提到 Go 1.22 中 string 和 bytes 的互转不需要再用 unsafe 那个包了,直接转就可以。我翻看了 Go 1.22 的 release notes 没找到相应的介绍,但是大家提到了 kubernetes 的 issue 中有这个说法:
As of go 1.22, for string to bytes conversion, we can replace
谢谢鸟窝老师,学习了👍
鸟窝老师,Go1.23 发布了
Go 1.24 发布了。可否将test code归纳到仓库,每个大版本更新跑跑看?
https://gist.github.com/smallnest/88efe8b969a93ed695f9c1fe1869e2f8