Hacker News new | ask | show | jobs
by dgb23 1014 days ago
> usually significantly worse than vanilla JS

Can to elaborate?

This is can be true if you're interacting with browser API's such as the DOM frequently, because there's an overhead.

But I've seen several projects where (non-GC) WASM has improved performance significantly for specific tasks. You won't get native performance obviously.

1 comments

>Can to elaborate?

The overhead of a runtime can easily make WASM code run slower than native JS functions. This only applies to GC languages like Go which require that.

>But I've seen several projects where (non-GC) WASM has improved performance significantly for specific tasks. You won't get native performance obviously.

You absolutely can if you're writing the raw WASM or compiling from C.