8 ms·
> Do JS engines actually still have any Asm.js optimisation code It's not 'Asm.js' optimisation code - it's normal optimisations that were there before Asm.js,
by chrisseaton 4y ago
> Do JS engines actually still have any Asm.js optimisation code
It's not 'Asm.js' optimisation code - it's normal optimisations that were there before Asm.js, and are still useful.
(I'm sure there are some exceptions and some thing were Asm.js-specific, but the basics are generic.)
- jraph 4y agoI think some of those optimizations were implemented because of asm.js, at least in Spider Monkey and old Edge's JavaScript engine, but yes, they should be generic in theory. https://en.wikipedia.org/wiki/Asmjs#Implementations https://en.wikipedia.org/wiki/Asmjs#Implementations
- pizlonator 4y agoI added the |0 optimization to JSC’s optimizer before asm.js was a thing. It worked for any use of a number in bit math, so like ~~x also had the same effect as x|0. Hilariously, I didn’t actually do the folding of x|0 to x because I didn’t know folks would do that. I just wanted to eliminate int overflow checks if the use didn’t care about the high bits. We only implemented the folding once asm.js became a thing.
- IshKebab 4y agoNo there definitely was Asm.js optimisation code, at least in Firefox. That was the entire point.
- deleted 4y ago[deleted]