MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / BenchmarkCheckEqualLargeMatrix

Function BenchmarkCheckEqualLargeMatrix

math/matrix/checkequal_test.go:52–62  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

50}
51
52func BenchmarkCheckEqualLargeMatrix(b *testing.B) {
53 size := 1000 // Choose an appropriate size for your large matrix
54 m1 := MakeRandomMatrix[int](size, size)
55 m2 := MakeRandomMatrix[int](size, size)
56
57 b.ResetTimer() // Reset the timer to exclude setup time
58
59 for i := 0; i < b.N; i++ {
60 _ = m1.CheckEqual(m2)
61 }
62}

Callers

nothing calls this directly

Calls 1

CheckEqualMethod · 0.80

Tested by

no test coverage detected