Closed shym closed 11 months ago
Testing on larger inputs seem to show that the preprocessor is handling about 14MB/s. (For comparison, the largest mli
in the compiler code base is 76KB). So this is probably good enough for now to say:
Closes #336.
Closes #342
Updated so that all print_X
functions (not print
itself, though, which is using) take ppf
as their last argument. And rebased.
This PR reworks the preprocessor by:
In a bit more details, the performance gains are obtained by changing the interface of the preprocessor so that it outputs its result into a formatter rather than a string and propagating the change all the way down, so that:
string
, or directly onstdout
in the case ofgospel pps
,print
becomes tail recursive.Using the example mentioned in #336 (test run in CI, so the performance may vary depending on load...), we go from:
to: