Int转string几种方式性能

Go语言内置int转string至少有3种方式:



fmt.Sprintf(“%d”,n)



strconv.Itoa(n)



strconv.FormatInt(n,10)

strconv.FormatInt()效率最高,fmt.Sprintf()效率最低



https://blog.csdn.net/flyfreelyit/article/details/79701577



Category golang