Untitled
unknown
plain_text
2 years ago
362 B
17
Indexable
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...