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!
-
-
I want to add this capability to JS as well with binary AST.
-
Do you think this is a likely outcome of binary-ast? If so, can we find a way to ship in FF and put the pressure on?
-
Streaming per-function parsing and bytecode compilation is an explicit goal. Streaming interpretation is harder and I think unlikely to happen. As for landing initial prototype so we can iterate more,
@ImYoric is working hard on that.
End of conversation
New conversation -
-
-
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!)
-
By (now) I meant "already landed" not "already shipped in stable"
-
Got it! Hope I wasn’t being pedantic, and thanks for your knowledge!
End of conversation
New conversation -
-
-
Interesting! I'll dig into some traces of WASM in FF. I've admittedly not spent long profiling effectiveness of their streaming implementation.
-
Streaming is a distraction. If you spend CPU processing the chunks you're getting, that's time you could've spent executing. It's an artifact of code not being able to execute early today so it seems like free CPU time. Split into smaller WASM files into and you notice each one.
End of conversation
New conversation -
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.