proposal-binary-ast icon indicating copy to clipboard operation
proposal-binary-ast copied to clipboard

Misleading FAQ on WebAssembly comparison

Open dmitriid opened this issue 8 years ago • 3 comments

README states:

Why not use WebAssembly?

There are massive existing untyped codebases, and there is no easy way to convert an untyped, garbage collected language to WebAssembly. And even if there were, there is no guarantee that it would be any faster to transmit/parse/start than what we currently have.

whereas WebAssembly FAQ states:

The kind of binary format being considered for WebAssembly can be natively decoded much faster than JavaScript can be parsed (experiments show more than 20× faster). On mobile, large compiled codes can easily take 20–40 seconds just to parse, so native decoding (especially when combined with other techniques like streaming for better-than-gzip compression) is critical to providing a good cold-load user experience.

dmitriid avatar Aug 02 '17 14:08 dmitriid

I see how our README's statement can be misleading. I'll try to further clarify: it is not that the WebAssembly format itself is slower, but that given that WebAssembly is a different language with minimal runtime, it cannot be used as is to conveniently transmit JS. It is unclear what it would currently mean to use wasm as a format for JS.

syg avatar Aug 02 '17 15:08 syg

Forgot to reference the issue # in the commit. ed7acff639aaac9a67429b572c66ba05923419d9 is the attempt to clarify.

syg avatar Aug 02 '17 15:08 syg

Thanks!

It looks that need to implement support for GC (at least) for JS to become a viable language

dmitriid avatar Aug 02 '17 17:08 dmitriid