27 Sep
2017
27 Sep
'17
2:18 a.m.
With std::deque you cannot control the segment size, and implementations differ widely. Is it not obvious that having a block size of 1 or 2 (as e.g. visual c++ does) is very fast.
Visual studio's implementation is almost brokenly slow compared to others.
That iteration over a deque can be slow has been known for two decades, Matt Austern wrote an article about it.
Not true. Libstdc++'s implementation iterates almost as fast as vector except for large structs (due to a fixed memory-based block size). http://www.plflib.org/benchmarks_haswell_gcc.htm#rawperformance M