2 ms·
It's important to note that WASM doesn't immediately deliver the speed benefits you'd think in all cases right now. Especially when you have to cross the bounda
by dccoolgai 6y ago
It's important to note that WASM doesn't immediately deliver the speed benefits you'd think in all cases right now. Especially when you have to cross the boundary of the module it's in (tested this a while back, browser vendors may have improved this since then). In my tests, it "sometimes does, sometimes doesn't" end up being faster than JS, and it's hard to build intuition around when that will happen consistently. Early days, so that may change, that's just what I see atm.
It's also interesting to note projects like AssemblyScript which open WASM to a Typescript subset. Very cool work they are doing.
When WASM first appeared, I had deep misgivings. I was picturing a dystopia of unmaintainable bytecode springing up everywhere and the WAT format as a hand-wavy dismissal of those concerns. Credit where credit is due, though, the W3C groups working on this are doing a great job and WAT is actually not terrible to read (or even write, if you have an afternoon to burn and want to take it on just to learn a thing or two about WASM - look for the wabt compiler).