3 ms·
Apple now tweaks cpus to make their js engine faster. This doesn’t sound as cool, but is more true. I’m also not sure if that’s a “win” in general. Dynamic lan
by wruza 8y ago
Apple now tweaks cpus to make their js engine faster. This doesn’t sound as cool, but is more true.
I’m also not sure if that’s a “win” in general. Dynamic languages used doubles since forever now and to me, either A) cpu makers sleep for too long, B) js is such a historical mess that fixing it in hw is reasonable now.
It is interesting how e.g. LuaJIT may benefit from that, but unfortunately it is [formally] unavailable on appstore because of licensing restrictions. As are non-apple fast js engines.
- eridius 8y agoAny JS engine on an ARMv8.3 chip could benefit from this instruction, not just Apple's JS engine. Sure you can't put other JS engines on an iPhone (at least not without jailbreaking), but this says ARMv8.3 adds it, not "Apple's specific CPU", though I have no idea if there are any other ARMv8.3 chips at the moment. As for other languages that use Doubles, this instruction isn't for general-purpose Doubles. CPUs already handle those. This instruction specifically implements the exact semantics that JavaScript wants. Now, maybe some other dynamic languages would want the same semantics when converting Doubles to ints, I don't know. But it's by no means a given that they would. Also, most languages don't use Doubles for all numeric types anyway.