Go Int转string几种方式性能测试

Go语言内置int转string至少有3种方式:性能 fmt.Sprintf("%d",n)测试 strconv.Itoa(n)code strconv.FormatInt(n,10)orm 下面针对这3中方式的性能作一下简单的测试:string package gotest import ( "fmt" "strconv" "testing" ) func BenchmarkSprin
相关文章
相关标签/搜索