Hacker News new | ask | show | jobs
by legulere 1522 days ago
Having 32 bit pointers in WASM does not mean that the JIT emits 32 bit code. 64 bit pointers always are a performance degradation, as they use up more space, it can just be negligible. 64 bit x86 most of the time being faster has nothing to do with pointer width but with more with having more registers, a better calling convention and a minimum of SSE2. This is also the reason why the x32 ABI is faster than regular x86-64.

The only advantage of 64 bit pointers is that you can have a bigger address space than 4GB.

1 comments

That’s not the only advantage, you can also store extra data in them which is extremely useful for performance (tagged objects) and security (PAC).

Although an abstract machine could have metadata with each pointer that isn’t part of the official bit size, I suppose.