logoalt Hacker News

xydonetoday at 12:01 PM3 repliesview on HN

The memory64 proposal was merged into upstream last year, any reason to opt into 32 bit despite that?


Replies

sesteptoday at 12:07 PM

It's slower. Wasm32 can just reserve 8 GiB (32-bit pointer + 32-bit offset) of the virtual address space from the OS for each memory, so checking for out-of-bounds memory accesses imposes no performance penalty. Wasm64 can't do that, so each memory access is a bit slower.

show 2 replies
trumpdongtoday at 1:16 PM

You don't need 4GB and it wastes memory to make pointers twice as big? Even Linux supports running 64-bit code in a 32-bit address space ("x32 ABI") for this reason.

show 1 reply
whizztertoday at 12:17 PM

Apple

show 1 reply