Prefer strconv over fmtPrefer strconv over fmtWhen converting primitives to/from strings, strconv is faster thanfmt. BadGood for i := 0; i < b.N; i++ { s := fmt.Sprint(rand.Int())} for i := 0; i < b.N; i++ { s := strconv.Itoa(rand.Int())} BenchmarkFmtSprint-4 143 ns/op 2 allocs/op BenchmarkStrconv-4 64.2 ns/op 1 allocs/op