teikalang / teika

MIT License
327 stars 7 forks source link

teika: share immutable substitutions #213

Closed EduardoRFS closed 5 months ago

EduardoRFS commented 5 months ago

Goals

Test a faster and maybe more flexible representation.

Context

Currently Teika uses a model with tree variables described at #210, this model is faster than the previous one but relies on a mutable stack, additionally it is not as fast as expected as pack is a slow'ish operation.

Here we preserve the model but use instead a immutable substitution stack, this works because it essentially make every term a "closed term".

Overall this change makes the tests around 5x faster.

Related