Live data from Hacker News

ARM chips have an instruction with JavaScript in the name

stackoverflow.com

11–20 of 312 posts

Re: ARM chips have an instruction with JavaScript in the name

#13
post #4
post #3

FTA: > Which is odd, because you don't expect to see JavaScript so close to the bare metal. This seems to ignore all the work done on server-side javascript with projects such as node.js and deno, as well as the fact that cloud service providers such as AWS have been developing their own ARM-based servers.

No it doesn’t, it’s still surprising to see a CPU instruction added specifically to cater for such a high level language like JS. It does totally makes sense though, given the importance of JS and it’s common use in mobiles.

Not surprising to me to see CPU instructions being added for widely used use cases. Basically, a CPU instruction set maker's job is to perform clustering of the tasks that the CPUs do and accelerate commonly used tasks. If people do a lot of AES, the instruction set maker adds AES extensions. If people do a lot of CRC, they add CRC instructions. If people convert doubles to integers all day in a very JS specific way, then that's the instruction they add.

Re: ARM chips have an instruction with JavaScript in the name

#17
post #12

So it was easier to add an instruction in silicon to cater for an ill-designed programming language, than to change the language itself? I mean, if float-to-integer performance is so critical, why was this not fixed a long time ago in the language ? What am I missing?

Consider Node JS is a top server side language, and arm for data centers is coming ( to the extent it's not already here), this makes sense.

Technically someone can just make a better VM engine for JavaScript to execute inside of, but whatever I guess they decided this would be easier.

Re: ARM chips have an instruction with JavaScript in the name

#19
It seems like every 2 months I feel the burn of JS not having more standard primitive types and choices for numbers. I get this urge to learn Rust or Swift or Go which lasts about 15 minutes... until I realize how tied up I am with JS.

But I do think one day (might take a while) JS will no longer be the obvious choice for front-end browser development.

Re: ARM chips have an instruction with JavaScript in the name

#20
post #16
post #7

My guess is that this is what JIT people asked for.

Don't sufficiently advanced compilers infer what the real type of a variable is, in the most important cases?

Many important cases are polymorphic so have to be able to handle both.
Post reply on HN