Author :
Pierre Le Marre
Date :
2023-09-25 12:07:58
Hash :f6f30c6b Message :Add benchark for compile-keymap
Implement `tasty-bench` method:
1. Set n = 1.
2. Measure execution time t_n of n iterations and execution time t_2n
of 2n iterations.
3. Find t which minimizes deviation of (n·t, 2·n·t) from (t_n, t_2n),
namely t = (t_n + 2·t_2n)/5n.
4. If deviation is small enough (see --stdev CLI parameter), return t
as a mean execution time.
5. Otherwise set n = 2·n and jump back to Step 2.
See: https://hackage.haskell.org/package/tasty-bench