diff options
| author | Andreas Källberg <anka.213@gmail.com> | 2020-11-29 14:51:55 +0100 |
|---|---|---|
| committer | Andreas Källberg <anka.213@gmail.com> | 2021-07-12 15:50:43 +0800 |
| commit | bd270b05ff92b15c15d5dfebd52576d0e15d0b04 (patch) | |
| tree | b815175b756a45859acbaf62d2a6fb04131929ef /src/runtime/java/Test.java | |
| parent | a1fd3ea142f215d7a030b8a95d32ba0c55dd61fb (diff) | |
Remove the `Either Int` from value2term
This prevents HUGE space leak and makes compiling a PGF a LOT faster
For example, an application grammar moved from taking over 50GB
of ram and taking 5 minutes (most of which is spent on garbage colelction)
to taking 1.2 seconds and using 42mb of memory
The price we pay is that the "variable #n is out of scope" error is now
lazy and will happen when we try to evaluate the term instead of
happening when the function returns and allowing the caller to chose how
to handle the error.
I don't think this should matter in practice, since it's very rare;
at least Inari has never encountered it.
Diffstat (limited to 'src/runtime/java/Test.java')
0 files changed, 0 insertions, 0 deletions
