4 ms·
Take that to the extreme and you get WASM, or it's predecessor asm.js It's also what JITers like V8 internally do, you'll get major performance hits if you do
by dtech 2y ago
Take that to the extreme and you get WASM, or it's predecessor asm.js
It's also what JITers like V8 internally do, you'll get major performance hits if you do weird dynamic things.
- hajile 2y agoIf you want complete type erasure, then a system that ensures monomorphism is critical to good JS performance. If you can leave the type system in place, then you could move toward an ML-style type system and see massive improvements within strictly-typed parts of the code as you'd only need type guards and inline caches at the boundaries of the strictly-typed code.
- crabmusket 2y agoI think taken to the extreme "use strong" is more like putting Dart in the browser. But yes, you can sort of get the benefits of use strong with the right discipline.
- Dylan16807 2y ago> Take that to the extreme and you get WASM, or it's predecessor asm.js Only if your code was pure number crunching. Normal code can't just go through some belt tightening to become WASM/asm.js code. Compiling it down that way is very different from making the control flow more understandable to the optimizer.