【文件属性】:
文件名称:golang_benchmark:golang性能测试
文件大小:6KB
文件格式:ZIP
更新时间:2021-03-28 18:41:25
Go
golang性能对比
测试平台:M1 Macbook Pro
golang版本:1.16.2
双向拼接
cd string_join
go golang_benchmark -bench=. -benchmem -run=none
结果
goos: darwin
goarch: arm64
pkg: test/string_join
BenchmarkForPlusShortText-8 1000000000 0.3198 ns/op 0 B/op 0 allocs/op
BenchmarkForFmtText-8 6477994 184.7 ns/op 48 B/op 1 allocs/op
B