News for hackers. Stuff that matters.
Re:Why the New V8 Is So Damn Fast by azhenley on Monday July 30, 2018 @09:22PM (#17649807)
You make some interesting points about cases where JS will always be difficult to be optimized automatically.

I wonder if compiler hints can help in that regard? For example, if performance is important then you could annotate the 'x+=x' line to tell the compiler to not check for overflow.

Re:Why the New V8 Is So Damn Fast by imtringued on Tuesday July 31, 2018 @07:04AM (#17652136)
We have that already. It's called asm.js and it's successor is WebAssembly.
Re:Why the New V8 Is So Damn Fast by amelius on Tuesday July 31, 2018 @05:32AM (#17651737)
Another option would be that the compiler deduces when exactly the statement x+=x would need to switch from integer to double. That's more difficult, and impossible in general, but not impossible in specific cases.
Re:Why the New V8 Is So Damn Fast by Thiez on Tuesday July 31, 2018 @02:30AM (#17650998)
Sure, you can hint with OR: `x = x | 0; x = (x + x) | 0;`. Bitwise operators always work on 32 bit integers in js. I'm not sure whether the js vms actually need or use this information.