Live data from Hacker News

Match Block Size to CPU / Cache with Boost.DynamicBitset

boost.org

1–2 of 2 posts

Re: Match Block Size to CPU / Cache with Boost.DynamicBitset

#2
Levers that matter: Backend: std::vector (default) or boost::container::small_vector for small buffer optimization and fewer heap hits. Block: choose an unsigned type that matches your CPU/cache tradeoffs (e.g., 64-bit on x64). Maintainability: API stays the same—operator&, |, ^, shifts, resize/shrink_to_fit. Add reserve for predictable growth.