2 ms·
I had a vague feeling that std::deque is a "heavy" thing which you shouldn't have a million of, but iterating through a couple big ones is pretty fast. 1–4K bat
by owl57 5y ago
I had a vague feeling that std::deque is a "heavy" thing which you shouldn't have a million of, but iterating through a couple big ones is pretty fast. 1–4K batches wouldn't hurt my feelings. Looked up GCC, it's actually slightly less heavy at 512 bytes per node[1]. But the MSVC part — that caught me completely off guard.
https://github.com/gcc-mirror/gcc/blob/47749c43acb460ac8f410ee599616d1860ee5a35/libstdc%2B%2B-v3/include/bits/stl_deque.h#L92 https://github.com/gcc-mirror/gcc/blob/47749c43acb460ac8f410...