remove static dispatch from PrintWriter in VM#142
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Ok, but does this actually improve build time or binary size relative to Ty? |
|
No (in general it looks like each binary we build is typically using only a single But I was going to experiment with passing |
94d0d8b to
0c215eb
Compare
|
Correction: the Python bindings use two different I checked the Python bindings, and the release build goes from 8.8MB to 8.6MB on this branch. If we make more functions that take the VM, that size saving will increase further. |
|
we definitely want to add a variant of print_callback that collects the output into So probably worth merging this, currently has conflicts. |
I'm not convinced that
&mut PrintWriteris called in a hot enough loop that inlining potential of static dispatch is worth the huge cost in bloat from additional monomorphizations of all VM methods for all P.