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

Function BenchmarkFactorial

math/factorial/factorial_test.go:59–69  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

57}
58
59func BenchmarkFactorial(b *testing.B) {
60 for _, input := range []int{5, 10, 15} {
61 for implName, implFunction := range implementations {
62 b.Run(fmt.Sprintf("%s_%d", implName, input), func(b *testing.B) {
63 for i := 0; i < b.N; i++ {
64 _, _ = implFunction(input)
65 }
66 })
67 }
68 }
69}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected