BenchmarkSubtract benchmarks the Subtract function.
(b *testing.B)
| 38 | |
| 39 | // BenchmarkSubtract benchmarks the Subtract function. |
| 40 | func BenchmarkSubtract(b *testing.B) { |
| 41 | // Create sample matrices for benchmarking |
| 42 | rows := 100 |
| 43 | columns := 100 |
| 44 | m1 := matrix.New(rows, columns, 2) // Replace with appropriate values |
| 45 | m2 := matrix.New(rows, columns, 3) // Replace with appropriate values |
| 46 | |
| 47 | for i := 0; i < b.N; i++ { |
| 48 | _, _ = m1.Subtract(m2) |
| 49 | } |
| 50 | } |