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

Function BenchmarkRows

math/matrix/matrix_test.go:229–238  ·  view source on GitHub ↗

BenchmarkRows benchmarks the Rows method.

(b *testing.B)

Source from the content-addressed store, hash-verified

227
228// BenchmarkRows benchmarks the Rows method.
229func BenchmarkRows(b *testing.B) {
230 // Create a sample matrix for benchmarking
231 rows := 100
232 columns := 100
233 matrix := matrix.New(rows, columns, 0)
234
235 for i := 0; i < b.N; i++ {
236 _ = matrix.Rows()
237 }
238}
239
240// BenchmarkColumns benchmarks the Columns method.
241func BenchmarkColumns(b *testing.B) {

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
RowsMethod · 0.80

Tested by

no test coverage detected