Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
362 B
10
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)
			}
		})
	}
}