-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix performance regression and more precise tests.
Replacing the `acc` argument of `overflow` with `0` mysteriously (something in the strictness analyser at a wild guess) made the code noticeably slower even when processing input with no overflows at all. The generated code was less optimal for the expected case! So the `acc` -> `0` changes are now reverted. Code coverage improvements are not always performance improvements... :-( Meanwhile, made the overflow detection tests more precise by testing `minBound - 10` and `maxBound + 10`, which ensure that the maximum quotient used is not off by 1 (or more).
- Loading branch information
Showing
2 changed files
with
37 additions
and
7 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