3 ms·
> There is no "one" thing that makes JavaScript or Python run fast. IIRC, The M series processors were explicitly designed with extra instructions for commonly
by rbanffy 3y ago
> There is no "one" thing that makes JavaScript or Python run fast.
IIRC, The M series processors were explicitly designed with extra instructions for commonly used JS functionality. Compilers for that platform can rely on such instructions for other languages as well.
Also, SPARC was designed to run C code fast - a function call would require little more than moving the register window to preserve the caller's context. Because of that, calling a function had a very small penalty compared to other architectures of the time.
- duskwuff 3y ago> The M series processors were explicitly designed with extra instructions for commonly used JS functionality. I think I know what you're thinking of and it's a little overblown. It's a single instruction - FJCVTZS - which performs a specific type of floating-point to integer conversion. It's a standard ARMv8.3 instruction, not an Apple extension. https://developer.arm.com/documentation/dui0801/l/A64-Floating-point-Instructions/FJCVTZS--A64- https://developer.arm.com/documentation/dui0801/l/A64-Floati...
- saagarjha 3y agoCompilers don't typically emit those instructions, it's people working on runtimes that need its semantics who do. Also, my understanding (to be fair I haven't really used SPARC much) is that register windows didn't really pan out as being efficient in practice. I think because people couldn't program for it?