5 ms·
how do you deal with msvc's `std::deque`? (or maybe you're not using literal std::dequeue)
by enqk 3y ago
how do you deal with msvc's `std::deque`? (or maybe you're not using literal std::dequeue)
- OnionBlender 3y agoWhat 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.
- HelloNurse 3y agoWhatever the issue is, they support Clang on linux, i.e. no MSVC standard library.