3 ms·
One of the reasons Apple does so well in browser tests is that ARM now has instructions to increasing the performance and decreasing the power draw of JavaScrip
by _kbh_ 5y ago
One of the reasons Apple does so well in browser tests is that ARM now has instructions to increasing the performance and decreasing the power draw of JavaScript operations.
- CalChris 5y agoWell, it has one: FJCVTZS Floating-point Javascript Convert to Signed fixed-point, rounding toward Zero.
- goldenkey 5y agoI thought you were kidding and then I looked it up: https://developer.arm.com/documentation/dui0801/latest/A64-Floating-point-Instructions/FJCVTZS https://developer.arm.com/documentation/dui0801/latest/A64-F... Seems kind of gross to me to have such a language specific instruction to be honest.
- olliej 5y agoIt’s actually “convert float to int the way x86 does it because js specified that behavior”
- olliej 5y agoIt’s simply matching the c86 float to int conversion, because JS specifies that behavior in the spec - all this instruction does is even the playing field it isn’t some magic instruction that does more than x86 does. At a logic level there are no changes to the expensive part of rounding, only changes to the overflow values in the result.
- saagarjha 5y agoWebKit measured this to be an improvement of less than 2%. So it is certainly "one of the reasons", but certainly not a driving one. (Plus, it's ARMv8.3+.)
- olliej 5y agoAnd to be clear that performance win comes from removing the branches that are otherwise needed to provide x86 semantics
- ksec 5y agoJSC didn't even use that instruction when most of the benchmark was done. It has absolutely nothing to do with it, the idea floated or amplified by Grubber / DaringFireball which I believe he never actually goes back to correct it even after the fact was shown. Much like his idea of $149 AirPods were made close to BOM cost. And that is how the whole world went on to believe all the wrong information.
- olliej 5y agoThat is one instruction and a more accurate definition of it would be “match x86 float to integer conversion”. It’s not a complex instruction, essentially using an explicit set of non default rounding flags. All in order to match what x86 does. So if that instruction does help arm, it is only in getting rid of an advantage x86 had in being the dominant arch 25 years ago.