[Interest] QMap<int64_t> significantly slower than QMap<int32_t>

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Mon Sep 23 10:27:24 CEST 2013


> Here are my results (g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3, Intel core
> i7, 1.2GHz, 8 GB RAM).
>
> $ ./qtvsstl 10000000
>
> Timing insertion of 10000000 items...
> QMap : 1737 msecs
> QHash : 821 msecs
> STL map : 5458 msecs
>
> Timing iteration over 10000000 items...
> QMap : 156 msecs
> QHash : 202 msecs
> STL map : 173 msecs
>
> Timing removal of random item from 10000000 items...
> Map : 0 msecs
> Hash : 0 msecs
> STL map : 0 msecs
>
> STL map seems to be the slowest for insertion.
>

The above was with Qt 4.8.1.

With Qt5.1.2, Qmap performance seems to worse (same as std::map's).

$ ./qtvsstl 10000000
Timing insertion of 10000000 items...
QMap : 5492 msecs
QHash : 1218 msecs
STL map : 5408 msecs

Timing iteration over 10000000 items...
QMap : 593 msecs
QHash : 443 msecs
STL map : 120 msecs

Timing removal of random item from 10000000 items...
Map : 0 msecs
Hash : 0 msecs
STL map : 0 msecs

Actually, everything's a little slower with Qt5. Is C++11 enabled by
default? Could that be the cause of degraded performance?

Thanks,
-mandeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130923/be07a0d7/attachment.html>


More information about the Interest mailing list