Browse Source

Add benchmark results to bottom

master
jimi 9 years ago
parent
commit
2807a75008
  1. 7
      difference_of_squares.go

7
difference_of_squares.go

@ -29,3 +29,10 @@ func SumOfSquares(n int) int {
func Difference(n int) int {
return SquareOfSums(n) - SumOfSquares(n)
}
// Iteration 1 benchmark:
//
// PASS
// BenchmarkSquareOfSums-12 30000000 56.5 ns/op
// BenchmarkSumOfSquares-12 20000000 63.8 ns/op
// BenchmarkDifference-12 20000000 113 ns/op
Loading…
Cancel
Save