[Development] Container benchmark was HEADS UP: Don't use QList, use Q_DECLARE_TYPEINFO

Gunnar Roth gunnar.roth at gmx.de
Mon Jul 13 08:26:09 CEST 2015


Hi Thiago
> Am 12.07.2015 um 19:42 schrieb Thiago Macieira <thiago.macieira at intel.com>:
> 
> On Sunday 12 July 2015 16:57:39 Gunnar Roth wrote:
>> "QMap_insert          -- 10000       ","WalltimeMilliseconds",0.625,80,128
> 
> Please run with -perf -minimumvalue 1000000. The CPU cycles counter is much 
> more accurate and more representative.
> 

There is no -perf option, i think you maybe meant the -tickcount option. So this is the result.

"QMap_insert          -- 10000       ","CPUTicks",3407433,3407433,1
"QHash_insert         -- 10000       ","CPUTicks",1767885,1767885,1
"stdmap_insert        -- 10000       ","CPUTicks",3060120,3060120,1
"stdvector_pb_sort    -- 10000       ","CPUTicks",1146499.5,2292999,2
"stdunordered_insert  -- 10000       ","CPUTicks",2521209,2521209,1
"qfasthash_insert     -- 10000       ","CPUTicks",1977711,1977711,1
"boostunordered_inser -- 10000       ","CPUTicks",2301750,2301750,1
"QMap_find            -- 10000       ","CPUTicks",1781553,1781553,1
"QMap_constFind       -- 10000       ","CPUTicks",1172022,1172022,1
"QHash_find           -- 10000       ","CPUTicks",231001.5,1848012,8
"QHash_constFind      -- 10000       ","CPUTicks",141855.75,1134846,8
"QVector_lowerbound   -- 10000       ","CPUTicks",1196103,1196103,1
"stdvector_lowerbound -- 10000       ","CPUTicks",1159581,1159581,1
"stdmap_find          -- 10000       ","CPUTicks",1531323,1531323,1
"stdunordered_find    -- 10000       ","CPUTicks",258110.25,1032441,4
"qfasthash_find       -- 10000       ","CPUTicks",332802,1331208,4
"boostunordered_find  -- 10000       ","CPUTicks",334885.5,2679084,8

Hmm now the insertion cost for vector is a lot less and even the fastest. Any clue why?

But QHash_constFind still the best and about 8 times faster than QVector.

> You can also try -perfcounter l1d-cache-loads or l1d-cache-load-misses (you 
> want to remove the -minimumvalue option) to see if there's more L1 cache miss 
> ratio.
> 

Ah i googled and this are option only available on linux,
but as i wrote i am doing these benchmarks on OS X. I have no linux installation but in a VM and not at home.

Regards,
Gunnar


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150713/30b515d3/attachment.html>


More information about the Development mailing list