alex at vikingsoft.eu
Wed Apr 26 23:33:51 CEST 2017
On Wednesday 26 April 2017 07:02:49 Marc Mutz wrote:
> FWIW: I'm against adding even more pessimising goodies to QVector. An
> area for push_front is such a goodie. The addition this causes is
> probably the reason why a QList, even for optimal payloads, is
> outperformed by QVector in my well-known benchmark from -Wmarc. Users
> that need a queue can use std::deque. If you don't iterate over it, it's
> a more than acceptable container.
I'm afraid is not so well-known. The benchmark I know is found in:
There you say:
"I didn’t check prepending, because the results should be comparable to
appending, at least for those containers which efficiently support them. I
also didn’t test insertions in the middle, since they’re rather rare."
The closest I know is the one that Stroustrup has shown in his talks (thanks
Ville for the link; I mentioned this in other thread, but I did not know which
But that's a comparison of std::list vs std::vector, and the benchmark is just
with the container holding integers.
Viking Software, Qt and C++ developers for hire
More information about the Development