makefile: add bench-fib target

This commit is contained in:
Simon Cruanes 2023-06-07 21:03:56 -04:00
parent 3d972cc0cd
commit bbe96de306
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -16,4 +16,16 @@ WATCH?=@all
watch: watch:
dune build $(DUNE_OPTS) -w $(WATCH) dune build $(DUNE_OPTS) -w $(WATCH)
DUNE_OPTS_BENCH?=--profile=release
N?=40
bench-fib:
@echo running for N=$(N)
dune build $(DUNE_OPTS_BENCH) benchs/fib_rec.exe
hyperfine \
'./_build/default/benchs/fib_rec.exe -psize=1 -n $(N)' \
'./_build/default/benchs/fib_rec.exe -psize=8 -n $(N)' \
'./_build/default/benchs/fib_rec.exe -psize=16 -n $(N)' \
'./_build/default/benchs/fib_rec.exe -n $(N) -seq'
.PHONY: test clean .PHONY: test clean