Skip to content

Instantly share code, notes, and snippets.

@hackintoshrao
Created December 25, 2015 18:40
Show Gist options
  • Save hackintoshrao/056ae56229732a751b11 to your computer and use it in GitHub Desktop.
Save hackintoshrao/056ae56229732a751b11 to your computer and use it in GitHub Desktop.
benchmark for the inefficient version one
package main
import (
"testing"
)
func BenchmarkFibV1(b *testing.B) {
// run the Fib function b.N times
for n := 0; n < b.N; n++ {
Fib(10)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment