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

Function BenchmarkCopyMatrix

math/matrix/copy_test.go:101–115  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

99}
100
101func BenchmarkCopyMatrix(b *testing.B) {
102 // Create a matrix for benchmarking
103 rows := 100
104 columns := 100
105 initialValue := 0
106 matrix := matrix.New(rows, columns, initialValue)
107
108 // Reset the benchmark timer
109 b.ResetTimer()
110
111 // Run the benchmarks
112 for i := 0; i < b.N; i++ {
113 _, _ = matrix.Copy()
114 }
115}

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
CopyMethod · 0.80

Tested by

no test coverage detected