[Development] QList for Qt 6

Konstantin Tokarev annulen at yandex.ru
Wed May 22 20:14:30 CEST 2019

22.05.2019, 21:10, "Giuseppe D'Angelo via Development" <development at 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.


"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."


More information about the Development mailing list