kanren icon indicating copy to clipboard operation
kanren copied to clipboard

Consider using `WeakKeyDictionary`s as states

Open brandonwillard opened this issue 3 years ago • 0 comments

In relation to https://github.com/pythological/kanren/issues/55, using a WeakKeyDictionary might help automatically thin large states containing "auxiliary" logic variables that are no longer relevant.

We would definitely need to profile this and see how well it scales in certain "directions".

N.B. A lot of the state cloning is implicitly done within unify, so this might be more appropriate for https://github.com/pythological/unification.

brandonwillard avatar Aug 01 '22 22:08 brandonwillard