Reduce allocations involved in temporary types?
LightAndLight opened this issue · comments
The instruction count / heap usage of my usual benchmark (./scripts/{callgrind,dhat} examples/todolist.ipso < ipso-cli/benches/todolist_1_input.txt
) crept up a little bit in #263.
I suspect it's from the extra types I create during checking. Examples:
ipso/ipso-typecheck/src/type_inference/mod.rs
Lines 454 to 462 in c0fa357
ipso/ipso-typecheck/src/type_inference/mod.rs
Lines 512 to 524 in c0fa357
ipso/ipso-typecheck/src/type_inference/mod.rs
Lines 740 to 745 in c0fa357
ipso/ipso-typecheck/src/type_inference/mod.rs
Lines 770 to 780 in c0fa357
ipso/ipso-typecheck/src/type_inference/mod.rs
Lines 959 to 967 in c0fa357
and more.
These temporary types involve heap allocations, because they're recursive.
Is this a big deal and is there a cheap way to do it?