On 10/07/2026 21:53, Dhruv Aron wrote:
On Tue, 7 Jul 2026 at 20:14, Heikki Linnakangas <[email protected]
<mailto:[email protected]>> wrote:
> Or maybe it's not a problem, in which case some kind of a
> worst case scenario benchmark to show that would be nice. Maybe test how
> it behaves when you have a lot of hash collisions, I think that'd make
> BufTableDelete() more expensive.
My additional benchmarking would suggest that, on average (one entry per
bucket), the spinlock would be held for an extra ~50ns compared to
releasing the header lock earlier for the current dynahash implementation:
It's not clear to me what the impact of that is in practice. Is that a
problem or not? Can you come up with an adversary test case where those
conflicts cause a lot of spinning?
Can you share the benchmark you used, please?
- Heikki