JavaScript code is much more expensive, byte for byte, than an image, because of the time spent parsing and compiling it. It's possible to parse and compile wasm as fast as it comes over the network, which makes it much more like an image than JavaScript code. Game changer!
-
-
Replying to @wycats
In V8, we have a script streamer allowing us to background parse JavaScript as it comes through on the network. This is in ways similar to “progressively” loading scans of an image, except we need to wait on parse/compile before we can execute the fetched code.pic.twitter.com/ztMZy7yZXu
4 replies 35 retweets 159 likes -
Replying to @addyosmani
in practice, if you look at traces, even with streaming JS, there's a big block of time between JS finishing on network and being ready to execute. A point you've made repeatedly :D
1 reply 1 retweet 14 likes -
Replying to @wycats
Indeed. I'm curious to see to what degree WASM can do better here in practice :)
1 reply 2 retweets 14 likes -
Replying to @addyosmani
At least in Firefox (today), wasm can finish compiling and be ready to execute by the time it finishes streaming the bytes. I expect this to be possible in all browsers once competitive pressure steps up.
3 replies 2 retweets 36 likes -
Replying to @wycats @addyosmani
Small nit: if youre talking about instantiateStreaming, MDN says FF 58, which I think is late Jan? (And if you’re talking about something else, I’m interested what it might be!)
1 reply 0 retweets 0 likes
By (now) I meant "already landed" not "already shipped in stable"
-
-
Replying to @wycats @addyosmani
Got it! Hope I wasn’t being pedantic, and thanks for your knowledge!
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.