Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR introduces a cache for the terms returned from calls to `Booster.LLVM.Internal.API.simplify`. Unpacking now uses a term store for the unpacked terms, and recognises shared terms by a shallow index into this store, using `TermF Int` as the map key (where the `Int` are indexes of symbol application/injection arguments in the term store). In small targeted tests using requests from MX-backend proofs , memory consumption was noticeably reduced, also resulting in better performance. Currently, the cache only lives for the duration of one LLVM call (not across different calls), no global variables or unsafe IO is required. Fixes #3863
- Loading branch information