Hacker News new | ask | show | jobs
by senfiaj 5 days ago
Not sure about SIMD. If you mean WASM, the main advantage of WASM32 over WASM64 is execution speed if it runs on a 64-bit runtime. This is because pointer accesses are simply 64-bit base pointer + 32/33-bit offset (the 32-bit pointer value in WASM program + some 32-bit optional offset). Since the offset in the memory access is already trimmed to 32/33-bit (in a 32-bit half of the register) at machine instruction level there is no possibility to escape the 8GB virtual memory cage that Chrome allocates, thus no need for additional runtime checks. WASM64, on the other hand, can escape without such checks.
1 comments

I just meant getting to use 32-bit numbers in general and not just for memory. It's nice to be able to use them for speed but also when things like GPUs only support them. I wish JS supported using them too.