I heard Webassembly will be a compilation target for statically typed languages and can be run in the browser. Claims were made that it could run in the browser at (close to) native speed. This is because the Wasm is relatively close to the machine instructions of the appropriate machine.
However there are 2 types of languages that can compile to Wasm:
My current understanding is that garbage collection is a process which negatively affects performance because it requires CPU cycles.
Could there be a difference in performance if a Wasm program is either written in a language which has garbage collection versus a language that has none?
The GC proposal is intended to be strictly pay-as-you-go. That is, a program not making use of related instructions should not be affected in any way.
Another way to think about it, at least as far as current browser implementations of Wasm are concerned, is that the GC proposal simply gives you a way to access the same heap that JavaScript values live in. That heap exists whether or not Wasm uses it, and when it doesn't, there is no difference to the current situation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With