Untitled
Anonymous
Plain Text
09/11/2023 10:36 AM
362 B
35
Indexable
Never
var table = []struct {
input int
}{
{input: 10},
{input: 100},
{input: 743},
{input: 3829},
}
func BenchmarkGenerateFibonacci(b *testing.B) {
// setup
b.ReportAllocs()
b.ResetTimer()
for _, v := range table {
b.Run(fmt.Sprintf("input_size_%d", v.input), func(b *testing.B) {
for i := 0; i < b.N; i++ {
GenerateFibonacci(v.input)
}
})
}
}Editor is loading...