News for hackers. Stuff that matters.
Re:Postgres rewritten in Rust, now passing 100% of the Postg... by mort96 on Friday July 10, 2026 @03:10AM (#48856702)
Passing pointers is not significantly faster than passing offsets into a shared memory pool.
Re:Postgres rewritten in Rust, now passing 100% of the Postg... by menaerus on Friday July 10, 2026 @10:31AM (#48860530)
Sorry, what? Passing a pointer is a matter of wrapping the value into the CPU register. OTOH passing an offset into a shared memory is a write to main memory so several magnitudes slower.
Re:Postgres rewritten in Rust, now passing 100% of the Postg... by mort96 on Saturday July 11, 2026 @09:22AM (#48871860)
Passing a pointer within one thread requires putting the pointer into a register. Passing a SHM offset within one process requires putting the offset into a register.

Passing a pointer between threads requires going through the memory system and letting cache coherence algorithms sort out the data sharing between cores (with or without a futex lock/unlock depending on implementation). Passing a SHM offset between processes requires going through the memory system and letting cache coherence algorithms sort out the data sharing between cores (with or without a context switch to the kernel depending on implementation).

It's not that different.