From ea4fc5e66d1dfb658e16dcefc1159fc5d7c56be5 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Wed, 18 Oct 2023 18:20:22 +0200 Subject: [PATCH] fine-tuned element prefetching in unprotected_bulk_visit --- include/boost/unordered/detail/foa/concurrent_table.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/unordered/detail/foa/concurrent_table.hpp b/include/boost/unordered/detail/foa/concurrent_table.hpp index 40a66c73..e93784a6 100644 --- a/include/boost/unordered/detail/foa/concurrent_table.hpp +++ b/include/boost/unordered/detail/foa/concurrent_table.hpp @@ -1216,7 +1216,8 @@ private: auto mask=masks[i]=(this->arrays.groups()+pos)->match(hash); if(mask){ BOOST_UNORDERED_PREFETCH(this->arrays.group_accesses()+pos); - BOOST_UNORDERED_PREFETCH_ELEMENTS(this->arrays.elements()+pos*N,N); + BOOST_UNORDERED_PREFETCH( + this->arrays.elements()+pos*N+unchecked_countr_zero(mask)); } }