-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add wave program to benchmarks (#1576)
* add wave program and parametrise it to compare inlined/generic version * use [`tasty-bench`](https://hackage.haskell.org/package/tasty-bench) library to show comparison * move benchmarks to test folder as they can now share tasty code * closes #1574 Using the recursive definition with ifs leads to a 3x slowdown: ``` wavesInlined 10: OK 361 ms ± 29 ms 20: OK 718 ms ± 35 ms 30: OK 1.066 s ± 28 ms 40: OK 1.437 s ± 37 ms wavesWithDef 10: OK 1.052 s ± 51 ms, 2.92x 20: OK 2.117 s ± 34 ms, 2.95x 30: OK 3.144 s ± 80 ms, 2.95x 40: OK 4.191 s ± 91 ms, 2.92x ``` But if we just inline and simplify the code, we can remove the runtime overhead completely.
- Loading branch information
Showing
3 changed files
with
57 additions
and
15 deletions.
There are no files selected for viewing
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
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
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