Hacker News new | past | comments | ask | show | jobs | submit login

> So long as this is the pattern, WebAssembly will necessarily take longer to load than JS because the same program written in wasm will be bigger than its JS variant.

Binary bytecode, which is what webassembly apps are, is often, generally, almost always smaller than source code. Except for really small programs.

Also, js code needs to be parsed previously. Webassembly code does not. Webassembly should load faster and execute faster.

Happy times ahead on the browser side...




I believe the thought was that, for many languages, there is an additional, standard runtime, which is not always remove-able from the language itself, which may not always be of a trivial size, and which is not guaranteed to be already available on a client machine.


I think you're misunderstanding Fil's point: JS is more expressive, and can often encode more things in a smaller package.

For same-code wasm / asm.js / x86 comparison (not what Fil was talking about) see section 7.3: https://github.com/WebAssembly/spec/blob/master/papers/pldi2...

Additionally, WebAssembly definitely needs to be parsed. See: https://github.com/WebKit/webkit/blob/master/Source/JavaScri... and https://github.com/WebKit/webkit/blob/master/Source/JavaScri...

Granted, that's simpler than parsing JavaScript.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: