2 ms·
Apples M chips are stupid fast at browsing the web because they have some native CPU instructions for JavaScript that x86_64 chips don’t.
by kube-system 4y ago
Apples M chips are stupid fast at browsing the web because they have some native CPU instructions for JavaScript that x86_64 chips don’t.
- acdha 4y agoThey’re fast but that’s not usually why. ARM added some functions which could help with math-limited code: https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-a-architecture-2016-additions https://community.arm.com/arm-community-blogs/b/architecture... Most JavaScript isn’t dependent on that specific a feature for performance, however. In most cases what matters more is that they have great memory performance and handle branch-heavy code well.
- yurishimo 4y agoAssuming you use Safari. For older relatives, probably not a bad assumption, but an important distinction to make nonetheless.
- acdha 4y agoMozilla also implemented it. I believe Chrome/v8 have as well, but I know there was some work there to avoid accidentally enabling it on older ARM chips which don't have support for it.
- hajile 4y agoActually, it's the reverse. The JS spec accidentally baked in the x86 description of int/float conversion. This is done a LOT in JS because the JITs are actually using integers instead of floats all over the place for improved performance. The ARM "JS" instruction just encodes the x86 semantics into hardware making the conversion several times faster than doing it in software.