Skip to content

v4.9.1

Latest

Choose a tag to compare

@martinus martinus released this 10 Aug 15:26

Fixes

  • Quadratic insert cost in the segmented containers. v4.9.0's exception-safety work grew segmented_vector's block pointer array with reserve(size + 1), which std::vector takes literally: every new segment reallocated the array and copied every pointer before it, so a plain insert loop into a segmented_map or segmented_set slowed quadratically — 8 million string keys took ~22 s instead of ~2 s. The array grows geometrically again, the no-leak guarantee on a failed allocation is kept, and a regression test counts allocations so it stays that way. Thanks @kraldan! (#188)

Full Changelog: v4.9.0...v4.9.1