Dcalc interpreter is very slow
denismerigoux opened this issue · comments
Denis Merigoux commented
On master
, the following command :
dune exec compiler/catala.exe -- Interpret examples/aides_logement/tests/tests_calculette_globale.catala_fr -s Exemple1 -d
Yields the following output :
[DEBUG] Starting interpretation...
[TIME] 263ms
[DEBUG] End of interpretation
A quarter second is huge for interpreting this program. It used to go trough in a dozen milliseconds in my memory. This should be investigated and the performance drop fixed.
Louis Gesbert commented
I have a patch that fixes this, will submit shortly
(basically the culprit was a type-converting identity on terms introduced in the interpreter ; the huge cost was due to the fact that it got called on partially evaluated terms, which I am now avoiding)