Skip to content

Instantly share code, notes, and snippets.

@hackintoshrao
Last active December 26, 2015 06:39
Show Gist options
  • Save hackintoshrao/1680faa010e97b9d1d42 to your computer and use it in GitHub Desktop.
Save hackintoshrao/1680faa010e97b9d1d42 to your computer and use it in GitHub Desktop.
Benchmark test for new version of Fib function
package main
import (
"testing"
)
func BenchmarkFibV1(b *testing.B) {
// run the Fib function b.N times
k := make(map[int]int)
k[0] = 0
k[1] = 1
for n := 0; n < b.N; n++ {
Fib(10, k)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment