4 ms·
I think this is the point where it starts being hard to argue that ARM is RISC anymore. x86 has BCD support and special facilities to handle NUL-terminated stri
by simias 8y ago
I think this is the point where it starts being hard to argue that ARM is RISC anymore. x86 has BCD support and special facilities to handle NUL-terminated strings (i.e. C-strings) but now ARM has instructions with "javascript" in the name. At least Jazelle was a separate extensions.
I mean I suppose it makes sense for them to do that, especially if the performance benefits are as huge as outlined in this tweet, but damn it feels dirty.
I assume the reason for this is that in JS, as far as I know, all numbers are stored as floats right? So you keep casting everywhere when you need an integer? I assumed that JS implementations where a bit more clever and kept them as ints whenever possible but maybe it's not as simple as I had imagined.
- zbjornson 8y agoNot all numbers are stored and operated on as doubles, no. They are treated as if they were though. V8 and Spidermonkey (idk about the others) store and handle integers that fit in 32 bits as 32-bit integers.
- kccqzy 8y agoThat's not the right metric for determining whether it's RISC or CISC. See my earlier comment at https://news.ycombinator.com/item?id=18074292 https://news.ycombinator.com/item?id=18074292