3 ms·
That's literally the opposite of what WASM is good for. The browser platform is incredible because it doesn't break backward comparability, and has a very wide
by samwillis 4y ago
That's literally the opposite of what WASM is good for.
The browser platform is incredible because it doesn't break backward comparability, and has a very wide set of features to allow you to do 90% of what you want, but at an (occasional) cost of performance for the 1% of cases. WASM is there for that 1%.
Figma is a good example, JS+SVG+Canvas+DOM would be too slow for their use case so they built a WASM renderer. But that renderer is limited in functionality to exactly what they need, that is where they gain there performance improvement. Not by being able to magically solve problems the browser devs haven't been able to. It just a case of having a simpler renderer.
That's where WASM shines (for rendering), allowing you to simplify to gain speed improvements.
It's exactly the same with using JS+Canvas for performance critical drawing where the DOM is too slow. Use a simpler toolkit.
Running a whole browser in WASM will always be slower, and doing what you suggest would just result in a single implementation "monoculture" anyway.
(On the monoculture comment, there isn't one, Safari is massive because of Apples block of other engines on iOS. Loose that block then there may well be a monoculture)