8 ms·
std::vector would mostly benefit from an improved allocator interface, where it requests N bytes, but the allocator can give more than that and report the actua
by steerablesafe 5y ago
std::vector would mostly benefit from an improved allocator interface, where it requests N bytes, but the allocator can give more than that and report the actual value.
- kevincox 5y agoFor example folly's vector performs this optimization: https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md#the-jemalloc-connection https://github.com/facebook/folly/blob/master/folly/docs/FBV...
- account42 5y agoYou can look forward to C++23 then: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0401r6.html http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p040...