Comment by deepsun
5 hours ago
> What would be needed is some sort of compatibility switch that disables all optional CPU features. Sure, you will get some reduced performance of the compiled code, but in exchange, a faster startup time.
I think other AOT-compiled languages don't opt in for the lowest set of CPU features -- they just detect them at runtime and use whenever present, all in compiled machine code.
It's normally an opt-in thing I think, since it's not an unconditional win: you have to figure out which code paths are worth it, and then where to trade off binary bloat vs the runtime cost of dynamic dispatch. In rust for example:
https://doc.rust-lang.org/beta/core/arch/#dynamic-cpu-featur...