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

Function BenchmarkColumns

math/matrix/matrix_test.go:241–250  ·  view source on GitHub ↗

BenchmarkColumns benchmarks the Columns method.

(b *testing.B)

Source from the content-addressed store, hash-verified

239
240// BenchmarkColumns benchmarks the Columns method.
241func BenchmarkColumns(b *testing.B) {
242 // Create a sample matrix for benchmarking
243 rows := 100
244 columns := 100
245 matrix := matrix.New(rows, columns, 0)
246
247 for i := 0; i < b.N; i++ {
248 _ = matrix.Columns()
249 }
250}

Callers

nothing calls this directly

Calls 2

NewFunction · 0.92
ColumnsMethod · 0.80

Tested by

no test coverage detected