BenchmarkGet benchmarks the Get method.
(b *testing.B)
| 203 | |
| 204 | // BenchmarkGet benchmarks the Get method. |
| 205 | func BenchmarkGet(b *testing.B) { |
| 206 | // Create a sample matrix for benchmarking |
| 207 | rows := 100 |
| 208 | columns := 100 |
| 209 | matrix := matrix.New(rows, columns, 0) |
| 210 | |
| 211 | for i := 0; i < b.N; i++ { |
| 212 | _, _ = matrix.Get(50, 50) // Change the row and column indices as needed |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | // BenchmarkSet benchmarks the Set method. |
| 217 | func BenchmarkSet(b *testing.B) { |