3 ms·
Memory allocation feature asked is not a language feature. It has to be baked into web assembly if you want to use portable byte masking with pointers. It's v
by nabla9 11y ago
Memory allocation feature asked is not a language feature. It has to be baked into web assembly if you want to use portable byte masking with pointers.
It's very low level implementation level detail that enables fast execution of dynamically typed languages. Boxing has high cost and it consumes memory. Type tags embedded in pointers can be very fast. For that to work, you need objects that are aligned with power-of-two byte boundaries.
Adding this feature enables efficient execution strategy for scripting and dynamic languages.
- Sanddancer 11y agoThe primary target of WebAssembly is strongly-typed pre-compiled languages, where the kinds of features you want would just lead to slowdowns and excessive memory consumption. There is no hardware currently out there that is a tagged architecture, so expecting them to bend backwards is not a realistic option.
- nabla9 11y agoYou don't need tagged architecture if you allocate memory by power-of-two regions.