22.05.2019, 21:10, "Giuseppe D'Angelo via Development" <development@qt-project.org>: > Il 22/05/19 18:32, Konstantin Tokarev ha scritto: >>> What about fast prepend in that case? People tend to use QList as a deque >>> because of the fast prepend/take first >> FWIW, std::deque is implemented as a peculiar data strucutre which is not >> really contiguous, and it may perform worse than QList in certain cases > > [citation needed], as usual.
https://en.cppreference.com/w/cpp/container/deque "As opposed to std::vector, the elements of a deque are not stored contiguously: typical implementations use a sequence of individually allocated fixed-size arrays, with additional bookkeeping, which means indexed access to deque must perform two pointer dereferences, compared to vector's indexed access which performs only one." -- Regards, Konstantin _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development