Last active
December 26, 2015 06:39
-
-
Save hackintoshrao/1680faa010e97b9d1d42 to your computer and use it in GitHub Desktop.
Benchmark test for new version of Fib function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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