2 ms·
The special CPU instruction for JS thing is a bit silly. Javascript defines it's floating point rounding behaviour as what Intel CPUs do. ARM behaves differentl
by simonh 6y ago
The special CPU instruction for JS thing is a bit silly. Javascript defines it's floating point rounding behaviour as what Intel CPUs do. ARM behaves differently by default, so they implemented an instruction to emulate the Intel behaviour specially to avoid Javascript running too slowly implementing the excepted behaviour in code.
This doesn't give ARM chips an advantage over Intel CPUs at executing Javascript for obvious reasons, once you know why they added it.
- gsnedders 6y agoAnd it effectively just sets the FPU flags, runs the instruction, then resets the FPU flags. It just avoids the JS VM from having change FPU flags repeatedly.
- CharlesW 6y ago> This doesn't give ARM chips an advantage over Intel CPUs at executing Javascript for obvious reasons, once you know why they added it. I believe the point is that it's one example (of hundreds, maybe thousands?) of performance paper-cuts addressed by Apple hardware that result in significant performance-per-watt advantages over devices not using Intel CPUs.