It’s not only faster, but it’s also so much faster! Almos 20% faster.
If you use WebAssembly, you might be able to get a response in 8ms rather than 10ms.
There’s a lot of other things to take into account are such as:
- Poor page design
- No minimizing network requests
- DOM rendering time
At the cost of a lot of working porting the code to C++, which would be a lot better spent optimizing the page where it will help.
There are though a lot of use cases where WebAssebmly can be way faster. It would be useful for games, which are more often than not written in C++ anyway.
But for the most part, WebAssembly just means “you can compile C++ for use in a web page”.
So, even if you could manipulate the DOM from WebAssembly and ported the code to C++, you would hardly even notice the difference in speed.
It’s easier. It’s more powerful. It’s fast enough, and the ecosystem is amazing. Except for areas like games and specialized libraries.
So, in conclusion, we don’t see WebAssembly making a dent in the foreseeable future.