/DPBenchmark

Benchmark runtime and memory footprint of three Fibonacci implementations

Primary LanguageGo

Benchmark dynamic programming en Go

Toy project to practice benchmarking with the Go programming language.

Compare memory and runtime of three fibonacci functions.

  1. The naive recursive approach
  2. An iterative approach, using a slice.
  3. An optimized iterative approach with a fixed number of variables.

Benchmark

Run the benchmark with:

go test -bench=. -benchmem > benchmark/raw.txt

Results on goos: darwin and goarch: amd64 available in ./benchmark/raw.txt.

Useful links

Benchmark analysis in my article (french)