GitHub user chiradip added a comment to the discussion: PR Proposal: 
Cache-Line-Friendly In-Memory Segment Index

Just to clarify: the optimization isn’t about binary search at all — that keeps 
coming up, (AM I READING IT WRONG?) but it’s not the target. The gain comes 
from improving the memory layout, which affects every path: O(1) open-segment 
lookups, sequential scans, timestamp lookups, compaction, replication, 
everything. Even with O(1) access, if an entry spans multiple cache lines or 
its hot fields aren’t contiguous, the CPU still pays extra memory loads. So the 
proposal isn’t changing algorithms — it’s simply making each access cheaper at 
the hardware level. Whether the search is O(1), O(log N), or a scan doesn’t 
matter; cacheline efficiency is orthogonal.

GitHub link: 
https://github.com/apache/iggy/discussions/2381#discussioncomment-15016294

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to