]> git.ipfire.org Git - thirdparty/haproxy.git/commit
IMPORT: ebst: use prefetching in lookup() and insert()
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Sep 2025 12:14:38 +0000 (14:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 17 Sep 2025 12:30:32 +0000 (14:30 +0200)
commit52c6dd773d5e49d9506844e5cc14762933068564
tree3cf171766f05b51bc300d83e7bb34963206ffded
parentfef4cfbd212df508f2d2681b845fcd8c8c2593a1
IMPORT: ebst: use prefetching in lookup() and insert()

While the previous optimizations couldn't be preserved due to the
possibility of out-of-bounds accesses, at least the prefetch is useful.
A test on treebench shows that for 64k short strings, the lookup time
falls from 276 to 199ns per lookup (28% savings), and the insert falls
from 311 to 296ns (4.9% savings), which are pretty respectable, so
let's do this.

This is ebtree commit b44ea5d07dc1594d62c3a902783ed1fb133f568d.
include/import/ebsttree.h