4 ms·
What exactly will be better? One can compile a lot of languages to JavaScript today. JavaScript is fast enough and size doesn't really matter for most use cases
by vbezhenar 11y ago
What exactly will be better? One can compile a lot of languages to JavaScript today. JavaScript is fast enough and size doesn't really matter for most use cases. Is WebAssembly going to be much faster than JavaScript?
- bobajeff 11y agoCompared to asm.js today it'll start-up faster because the format parses quicker. It will also be smaller in size compared to a gzipped asm.js equivalent. Edit: Also, browser vendors will optimize it more consistently than they do with asm.js currently. Also, compared to Emscripten the llvm backend for WebAssembly is upstream so you might see more frontend languages like Swift and Rust add support for it.
- Mikeb85 11y agoWebassembly is basically a portably assembly language (as in, lower level than C), that then gets translated instruction for instruction into actual assembly language. It's several layers 'below' JavaScript. It's basically cross-platform, native code.
- acqq 11y agoAnd moreover, the resulting native code is executed inside the same VM that executes normal Javascript, so it's not anything like starting some Flash file, it's just that we can have native code speed, when needed, inside of the Javascript. That existed already with asm.js. This step now should allow less overhead in parsing such code, which matters when there is a lot of code like in the games or big programs directly translated from lower-language code base. Less overhead means less battery drain and faster start of the program, as an example.
- r1ch 11y ago"Fast enough" still isn't fast enough for mobile devices. I have a high end phone and still get multi second freezes from all the JS parsing and executing on modern websites.
- tromp 11y agoAny application relying heavily on 64 bit integer arithmetic will be vastly better...