4 ms·
The ARM instruction set was expanded to better support JavaScript[0], so why not? [0]: https://stackoverflow.com/questions/50966676/why-do-arm-chips-have-an-in
by RyJones 6y ago
The ARM instruction set was expanded to better support JavaScript[0], so why not?
[0]: https://stackoverflow.com/questions/50966676/why-do-arm-chips-have-an-instruction-with-javascript-in-the-name-fjcvtzs https://stackoverflow.com/questions/50966676/why-do-arm-chip...
- olliej 6y agoThat instruction is super overrated. It has next to no architectural cost - all it does is specify a constant set of rounding and overflow flags instead of using the current fpu state. The only real win is a code size reduction. JavaScriptCore didn’t even use it when it was first made available because that operation is relatively uncommon and the cost is dominated by the fpu logic that precedes rounding - so it essentially does not matter for real world js. It may be possible to make a micro benchmark that it helps, though I doubt it.
- saagarjha 6y agoI remember when Twitter was having a field day thinking that this instruction was the reason why the newest iPhones benchmarked well. There is no "magic instruction" that gets you a 40% increase in benchmarks. None. It would literally need to be multiple times faster and executed like half the time to get that increase, which is clearly not the case for a JavaScript floating point conversion. It took someone from the JavaScriptCore team replying with "we don't even emit that yet" for people to see sense.