
On 6 Sep 2025 11:42, Ion Gaztañaga via Boost wrote:
El 05/09/2025 a las 22:01, Joaquín M López Muñoz via Boost escribió:
No dia 5 de set. de 2025, às 21:51, Andrey Semashev via Boost <boost@lists.boost.org> escreveu:
On 5 Sep 2025 20:22, Gennaro Prota wrote:
On 9/5/2025 5:47 PM, Andrey Semashev via Boost wrote: On 5 Sep 2025 17:52, Gennaro Prota via Boost wrote:
I think I'll now implement the possibility to change the underlying buffer type ("allocator or container" template parameter).
One downside with the "allocator or container" approach is that you would have to duplicate the size of the container. The embedded container will maintain its size as the number of words, but the last word in the bitset may be incomplete, so the bitset will have to have a size of its own.
That was already the case. So far, dynamic_bitset used a std::vector< Block, Allocator >. Now, it will either use that or the provided container type.
This is unfortunate. I wish this was optimized as well.
What kind of optimization do you have in mind? I don’t think using std::vector as the backend can really introduce any performance penalty.
I think Andrey was talking about a "sizeof(dynamic_bitset)" optimization (optimal when your application has lots many empty dynamic_bitsets, maybe because this bitset is optional).
Yes, correct.