From 763766e9ab8ed095e8f845228d89b856337aadc0 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sun, 16 Feb 2025 12:17:10 -0500 Subject: [PATCH] math/big: report allocs in BenchmarkNatMul, BenchmarkNatSqr Change-Id: I112f55c0e3ee3b75e615a06b27552de164565c04 Reviewed-on: https://go-review.googlesource.com/c/go/+/650637 Reviewed-by: Robert Griesemer LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Auto-Submit: Russ Cox --- src/math/big/nat_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/math/big/nat_test.go b/src/math/big/nat_test.go index 4722548fa9..46231f7976 100644 --- a/src/math/big/nat_test.go +++ b/src/math/big/nat_test.go @@ -228,6 +228,7 @@ func benchmarkNatMul(b *testing.B, nwords int) { y := rndNat(nwords) var z nat b.ResetTimer() + b.ReportAllocs() for i := 0; i < b.N; i++ { z.mul(x, y) } @@ -738,6 +739,7 @@ func benchmarkNatSqr(b *testing.B, nwords int) { x := rndNat(nwords) var z nat b.ResetTimer() + b.ReportAllocs() for i := 0; i < b.N; i++ { z.sqr(x) } -- 2.50.0