News for hackers. Stuff that matters.
Re:WASM 3.0 Completed by phire on Wednesday September 17, 2025 @08:05PM (#45283080)
Because CPUs still have instructions that automatically truncate the result of all math operations to 32 bits (and sometimes 8-bit and 16-bit too, though not universally).

To operate on any other size, you need to insert extra instructions to mask addresses to the desired size before they are used.

Re:WASM 3.0 Completed by jsheard on Wednesday September 17, 2025 @08:13PM (#45283167)
I don't think masking addresses would be that expensive, but the problem is that WASM doesn't allow illegal memory accesses to just wrap around. Runtimes have to detect them and throw an exception, which means they need to branch every time they touch the heap.