(no title)
theresistor | 1 year ago
Mostly the former. Some highly optimized bits of software do the latter—they are built with multiple code paths optimized for different hardware capabilities, and select which one to use at runtime.
> Do dynamic languages (Javascript, Python, PHP...) get a speed boost because they can compile just in time and use all the features of the user's CPU?
Hypothetically yes, but in practice no for the languages you mentioned because they don't map well to things like SIMD. Some JIT-based numerical computing systems as well as JIT-based ML compilers do reap those benefits.
jsheard|1 year ago
They tried to do something similar in Javascript but it added way too much complexity to the runtimes and ended up getting dropped in favor of WASM SIMD.
twic|1 year ago
https://docs.oracle.com/en/java/javase/23/docs/api/jdk.incub...
https://docs.oracle.com/en/java/javase/23/docs/api/jdk.incub...
thfuran|1 year ago