powdr-labs/powdr

type checker performance

Closed this issue · 1 comments

the type checker / type inference currently has very poor performance.

This is especially visible in the arith reparse test. This test generates type vars in the ten thousands. Ideas for improving:

we could try to change the type vars from string to numbers and store the substitutions in a compact vector.

Another way would be to try to limit the size of the global substitution map, or even keep the substitutions local only, i.e. when a type var is substituted, just make sure that it does not exist anywhere in the system any more.

Fixed by #1656