概要 概要 たまに聞かれるのと、その都度ベンチマーク書いているような気がしたので、以下にメモメモ。。。 package main import ( "strconv" "testing" ) func BenchmarkSliceLen0Append(b *testing.B) { var ( s []string ) b.StartTimer() for i := 0; i < b.N; i++ { //lint:ignore SA4010 ok s = append(s, strconv.Itoa(i)) } b.StopTimer() } func BenchmarkSliceLenN(…