]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: ebtree: make ebmb_insert_prefix() keep a copy the new node's pfx
authorWilly Tarreau <w@1wt.eu>
Tue, 15 Nov 2022 07:08:24 +0000 (08:08 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 15 Nov 2022 08:37:09 +0000 (09:37 +0100)
commitbf13e53964228eece9d5d532943720bd9af7915b
tree5abf840d21af5819485eb5b24d845f175a38ffb3
parente98d3858197c774db532dcac5fe9d7a1b24fb761
OPTIM: ebtree: make ebmb_insert_prefix() keep a copy the new node's pfx

looking at a perf profile while loading a conf with a huge map, it
appeared that there was a hot spot on the access to the new node's
prefix, which is unexpectedly being reloaded for each visited node
during the tree descent. Better keep a copy of it because with large
trees that don't fit into the L3 cache the memory bandwidth is scarce.
Doing so reduces the load time from 8.0 to 7.5 seconds.
include/import/ebmbtree.h