How Swift Achieved Dynamic Linking Where Rust Couldn't A look at what's required to ship a dynamically linked system interface, the most interesting parts of Swift's stabilized ABI, and their incredibly ambitious resilient library evolution system https://gankra.github.io/blah/swift-abi/
-
-
My final attempt to save tydescs was actually to compress addref/release/etc code into a generic interpreter that could parse an abstract description of the type. This reduced code size/compile time a lot but brought the overhead of tydescs to ~30% IIRC (could be misremembering).
-
were you using a hybrid monomorph/polymorph approach like swift does? that seems to smooth over the pain in a lot of places.
- 3 more replies
New conversation -
-
-
Polymorphic code that indirects everything also tends to be pretty hefty in assembly language terms. Bytecode for unspecialized functions also seems like a reasonable alternative if you're not allowed to have a JIT
-
Yeah, that approach is really tempting. Especially since most code is cold.
- 2 more replies
New conversation -
-
-
yeah graydon told me about a bunch of it, because it was so ironic/hilarious that he ended up working on swift where they actually committed to it. i didn't mention it because it's in some sense irrelevant, given the two languages comitted to diverging paths/philosophies long ago
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
The way I would put it is that monomorphization /can/ reduce code-size if you are able to eliminate the original code and optimize the monomorphizied code. On the other hand if one monomorphizes a function a bazillion times... sadness =--(.
-
If only one set is in use at a time, it's not really a problem to have a billion copies compressed on disk.
- 2 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.