原书出处
効率的なGo
08 基准测试 8.1.1 Goのベンチマーク
-1: Goのベンチマークの核となる要素
func BenchmarkSum(b *testing.B) { b.ReportAllocs() ❶ // TODO(bwplotka): 必要な初期化処理を追加 b.ResetTimer()
❷ for i := 0; i < b.
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/効率的なGo/_epub-src/OEBPS/ch08.xhtml#code-sum-go-bench-simple
EPUB SHA-256:cd17c5323d09b92488476e0d35d69efdbcadee1c9eca48e70d03aa267851fe09