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.
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.
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.