From 95775c591a71d8a6e2647f66fec385c6932a53bc Mon Sep 17 00:00:00 2001 From: Jones <2944106+c-bebop@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:09:39 +0100 Subject: [PATCH] Revise comment on when to use a hash table. --- include/dhb/block.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/dhb/block.h b/include/dhb/block.h index a8c5c8b..45857f6 100644 --- a/include/dhb/block.h +++ b/include/dhb/block.h @@ -21,10 +21,10 @@ inline index_type tombstoneIndex() { return static_cast(-2); }; // TODO: This could take the entry size into account. inline bool uses_htab(size_t bsize) { const size_t cache_line = 64; - // Each entry is typically 16 bytes or so. - // Preliminary experiments how that using the hash index is only useful if the block becomes - // larger than several cache lines (approx. 16 or so). - // Hence, the following is a reasonably good heuristic: + // Each entry is typically 16 bytes or so. Preliminary experiments show that + // using the hash index is only useful if the block becomes larger than + // several cache lines (approx. 16 or so). Hence, the following is a + // reasonably good heuristic: return 16 * bsize > 16 * cache_line; }