4 ms·
> Also, it is unlikely that compiling to WASM will be more effective than to native code because browser cannot afford spending as much time on optimization as
by UncleEntity 4y ago
> Also, it is unlikely that compiling to WASM will be more effective than to native code because browser cannot afford spending as much time on optimization as a native compiler.
No reason whatever compiles the code to wasm can’t perform all the expensive optimizations and the wasm execution environment just runs it.
In fact, I would be very disappointed in a tool that didn’t run optimization passes over the code while it still had the language specific information to inform the optimizer.
Then you just pass the multi-megabyte wasm payload over to the browser to render your static content — all’s still good in the webdev world.