Live data from Hacker News

ARM chips have an instruction with JavaScript in the name

stackoverflow.com

171–180 of 312 posts

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

#171
post #60

Emery Berger argues that the systems community should be doing exactly this -- improving infrastructure to run JS and Python workloads: https://blog.sigplan.org/2020/10/12/from-heavy-metal-to-irra... We need to incorporate JavaScript and Python workloads into our evaluations. There are already standard benchmark suites for JavaScript performance in the browser, and we can include applications written in node.js (serv…

“We need more performance, should we fix the underlying performance problem in our software? No, we should design our CPU’s to accommodate our slow, bottlenecked language!” Asking for CPU features to speed up Python is like trying to strap a rocket to horse and cart. Not the best way to go faster. We should focus on language design and tooling that makes it easier to write in “fast” languages, rather than bending ove…

> “fast” languages

What are those?

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

#172

Earlier quoted context omitted.

Nothing justifies the prolonging of Javascript torture.

For a long time I thought the JS hate was just a friendly pop jab. From working with backend folks I’ve realized it comes from at least a somewhat patronizing view that JS should feel more like backend languages; except it’s power, and real dev audience, is in browsers, where it was shaped and tortured by the browser wars, not to mention it was created in almost as many days as Genesis says the world was built.

So, there are excuses for Javascript's terribleness, but that doesn't stop it from being objectively terrible.

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

#173
post #49

Earlier quoted context omitted.

Is that significant enough to justify the instruction?

Nothing justifies the prolonging of Javascript torture.

So you're saying we should applaud reducing it by 1-2% right?

To answer the question of if it's worth it to add this specialized instruction, it really depends on how much die space it adds, but from the look of it, it's specialized handling of an existing operation to match an external spec; that can be not too hard to do and significantly reduce software complexity for tasks that do that operation. As a CE with no real hardware experience, it looks like a clear win to me.

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

#175

If anybody else was curious, it appears that the performance win of use of this instruction looks to be about 1-2% in general javascript workloads: https://bugs.webkit.org/show_bug.cgi?id=184023#c24

I would argue a solid 1-2% can get you a promotion in HW companies. You put 5 of this improvements and that’s a generational improvement.

1-2% for a single language at the cost of polluting an entire instruction set.

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

#176

Earlier quoted context omitted.

I would argue a solid 1-2% can get you a promotion in HW companies. You put 5 of this improvements and that’s a generational improvement.

1-2% for a single language at the cost of polluting an entire instruction set.

[deleted]

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

#177

Earlier quoted context omitted.

I would argue a solid 1-2% can get you a promotion in HW companies. You put 5 of this improvements and that’s a generational improvement.

1-2% for a single language at the cost of polluting an entire instruction set.

Would you say the same if the language was c or c++?

Yes this is necessitated by some of JS's big warts, but the sheer amount of javascript in existence weights heavily when considering the trade-offs. You cannot ignore HTML/JS if you're targeting UI applications - it is table stakes.

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

#178
post #49

Earlier quoted context omitted.

Is that significant enough to justify the instruction?

A great question for the folks who actually do CPU design! As somebody who writes JS rather frequently I’m not complaining.

it depends on the cost (in gates and timing) looks like this might be just a few gates

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

#179
post #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.

I dunno how you folks do it, but I admire anyone that can stick with JS. It's just so...bonkers, every aspect about it, from the obvious "wat" moments, lack of integers, to the mental overhead of libs, modules, frameworks, templates, and packing. But I'm glad I have coworkers that grok it.

I like trying new languages and have played with dozens, and JS and Prolog are the only languages that have made me actually scream.

You should definitely try to branch out. At the very least it gives you new ways of thinking about things.

Go or dart is probably the best for "JS killer" in terms of maturity, tooling, and targeting the front end, followed by haxe, swift and/or rust (they may be better even, but frankly I'm not as familiar with them).

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

#180

Earlier quoted context omitted.

Nothing justifies the prolonging of Javascript torture.

Nothing justifies the prolonging of C torture either, except of the C's wide spread. Why do you think modern CPUs still expose mostly C-abstract-machine-like interface instead of their actual out-of-order, pipelined, heterogeneous-memory-hierarch-ied internal workings?

There is one CPU that exposes its out of order inner workings, the VIA C3 ("ALTINST"). The unintended effects are so bad that people that accidentally discovered it referred to it as a backdoor: https://en.wikipedia.org/wiki/Alternate_Instruction_Set
Post reply on HN