9 ms·
What is special about msvc's `std::deque`?
by OnionBlender 3y ago
What is special about msvc's `std::deque`?
- josefx 3y agoThe memory chunks it allocates to store entries are so small that it ends up allocating one chunk for every element for almost every type. The result is a lot of allocation overhead, pointer indirection and various other things that are bad for performance.
- nly 3y agoIt's block size is something stupid like 16 bytes, so it effectively becomes a slower linked list.
- dwattttt 3y agoSee https://devblogs.microsoft.com/oldnewthing/20230810-00/?p=108587 https://devblogs.microsoft.com/oldnewthing/20230810-00/?p=10... which includes confirmation & a brief commentary of the tiny block size.