News for hackers. Stuff that matters.
Re:Faster JavaScript Calls by brundolf on Monday February 15, 2021 @02:25PM (#26146166)
Maybe from a certain perspective. But it worked by conforming the bundle to a particular subset of JS that the authors knew to be optimized, instead of expressing information to the interpreter outright. That seems like a comparatively limited channel for communication.
Re:Faster JavaScript Calls by jacobolus on Monday February 15, 2021 @02:52PM (#26146482)
From what I understand, in Safari at least they tried to make many of the optimizations general. So if you use asm.js-style type indications in your code even without following the full spec, you might see some performance benefit.

I have sometimes found a speedup when adding apparently an superfluous |0.

Re:Faster JavaScript Calls by pornel on Monday February 15, 2021 @05:22PM (#26148324)
The highly optimizable, explicit and precise code for the interpreter is WASM.

JS VMs don't need more hints from the code. They need guarantees. They already analyze and profile JS, but as long as JS is allowed to be dynamic (and it has to, it won't be JS without it), then they have to keep the complexity and cost of all the extra runtime checks and possible deoptimizations.