3 ms·
My comment is about ES6 proper tail calls. WASM is another story
by pygy_ 4y ago
My comment is about ES6 proper tail calls. WASM is another story
- leoc 4y agoGraaagh, sorry.
- int_19h 4y agoIt's not that much better. Apparently at least some of the idiosyncracies in the design of wasm, such as the lack of regular unstructured branches, is due to the internal implementation details of V8.
- titzer 4y agoEvery optimizing JIT for JavaScript has the same limitations.
- int_19h 4y agoThen maybe we shouldn't be repurposing VMs written for JavaScript for that brand new thing? Ditch the baggage and do it right. Especially given that, if successful, wasm is basically the next JS, and will be around for decades.
- titzer 4y agoI'm all for rewriting things from scratch. That's why I'm doing a new Wasm engine from scratch. But reusing TurboFan is how we took Wasm from concept to near-native performance, shipped in Chrome, in 2.5 years.
- int_19h 4y agoThat's all well and good - but, again, the spec will be around for decades. Compromises made today to ship things faster means a lot of pain in those years ahead. I pity all the compiler writers who will have to implement relooper again and again. But instead we'll probably do things like asm.js - that is, bless certain wasm patterns such that advanced VMs would be guaranteed to optimize them. And so everything will be way more complicated than it needs to be. Just like the JS stack today.