CatalaLang / catala

Programming language for literate programming law specification

Home Page:https://catala-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dcalc interpreter is very slow

denismerigoux opened this issue · comments

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.

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)