MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / BenchmarkMatchDimensions

Function BenchmarkMatchDimensions

math/matrix/matchdimensions_test.go:30–40  ·  view source on GitHub ↗

BenchmarkMatchDimensions benchmarks the MatchDimensions method.

(b *testing.B)

Source from the content-addressed store, hash-verified

28
29// BenchmarkMatchDimensions benchmarks the MatchDimensions method.
30func BenchmarkMatchDimensions(b *testing.B) {
31 // Create sample matrices for benchmarking
32 rows := 100
33 columns := 100
34 m1 := matrix.New(rows, columns, 0) // Replace with appropriate values
35 m2 := matrix.New(rows, columns, 0) // Replace with appropriate values
36
37 for i := 0; i < b.N; i++ {
38 _ = m1.MatchDimensions(m2)
39 }
40}

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
MatchDimensionsMethod · 0.80

Tested by

no test coverage detected