https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67922

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #8)
> We could look at making _M_deallocate_nodes check if each node is the last
> in a bucket, and if so, set the bucket to nullptr. That would assign to N
> elements of the array instead of memsetting the entire array, where N is the
> bucket count.

Correction, N would be the number of non-empty buckets, not the bucket count.

But for some containers, most buckets are non-empty, which is why zeroing the
whole array is better.

Reply via email to