-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: improve to_additive performance (#1060)
Using ``` def Ones : ℕ → Q(Nat) | 0 => q(1) | (n+1) => q($(Ones n) + $(Ones n)) ``` The new `to_additive` takes `45ms` on `Ones 500` (higher gives stack overflows) The old `to_additive` takes `13794ms` on `Ones 17` (exponential in the argument) There is still one issue workaround by using `transform` in `etaExpand`. * Remove `replaceRecM` and `replaceRecMeta` that are exponentially slow * Remove `replaceRecTraversal` because its interface is less convenient than `replaceRec` Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
- Loading branch information
1 parent
f976b5e
commit 8b308fa
Showing
4 changed files
with
112 additions
and
145 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
Oops, something went wrong.