3 ms·
iOS already supports bitcode deployments to the app store, I believe this is the direction they are taking to solve this problem.
by snovv_crash 5y ago
iOS already supports bitcode deployments to the app store, I believe this is the direction they are taking to solve this problem.
- KMag 5y agoVery nice. I hope that in the future, native code will be the distribution format about as often as we write inline assembly. Sometimes you'll really need precise control over instructions, but for 99% of code, it's not worth the cost in giving up long-term technology improvements. In particular, x86's total store ordering memory model causes some memory fences to disappear at the machine code level. The Aarch64 relaxed memory model allows for lower cache synchronization overhead, but code with correct memory fences compiled to x86 loses this information, requiring overly conservative binary translation/higher overhead TSO mode in Aarch64 binary translators. These days, hardware acquire/release/full flavors of memory fences better match the C++ and Java memory models, but some hardware has load/store/full flavors of memory fences. Binary translation across these flavors means changing all fences to full fences, or else some static analysis that's far beyond anything I'm aware existing at this time.
- masklinn 5y agoAfaik bitcode remains architecture-dependent, so bitcode deployments is mostly do they can re-optimise, and a convenient component of app slicing (if they end up generating the final bundle anyway, having more visibility into what’s what is useful).
- KMag 5y agoI think re-targeting bitcode for a different architecture with the same pointer size and endinness is a pretty light weight operation, but I might be wrong. I'm pretty sure it's orders of magnitude lower overhead and less complicated than dynamically recompiling native code.
- masklinn 5y agoOh for sure.
- qznc 5y agoWith C/C++ the preprocessor makes architecture-dependent decisions. Bitcode has no chance to fix that.
- Spivak 5y agoSo this is true but also not that relevant, bitcode is your architecture.