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

Function BenchmarkLowerBound

search/binary_test.go:72–78  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

70}
71
72func BenchmarkLowerBound(b *testing.B) {
73 testCase := generateBenchmarkTestCase()
74 b.ResetTimer() // this is important because the generateBenchmarkTestCase() is expensive
75 for i := 0; i < b.N; i++ {
76 _, _ = LowerBound(testCase, i)
77 }
78}
79
80func BenchmarkUpperBound(b *testing.B) {
81 testCase := generateBenchmarkTestCase()

Callers

nothing calls this directly

Calls 2

LowerBoundFunction · 0.85

Tested by

no test coverage detected