to be clear: vtable pointers are never part of a struct, they are either in the ref-counting header of a box, or passed as an "argument" to polymorphic code. this must be, as e.g. Array<T> lays out struct values inline and has the same layout in polymorphic and specialized code
I was pretty burned on the whole approach after that and resolved that I’ll just use an interpreter and/or a JIT if I ever wanted to avoid template specialization again. Maybe I should have tried harder, but that was the result.
-
-
You know, I have a sneaking suspicion that a “PGO” for Rust that did nothing more than replace cold functions with MIR and interpret them with Miri would probably be disgustingly effective at reducing code size without much perf hit I don’t think we should do this of course :)
-
You should totally do it. I suspect an interpreter is the right answer even for unspecialized Swift code, since it's already a bunch of indirect jumps anyway
- 5 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.