QHash vs. unordered_map

André Stein andre.stein.1985 at gmail.com
Wed Nov 21 23:50:23 UTC 2012


I got the following results which confirm Milian's:

RESULT : 
TestItemRepository::testStringHashPerformance():"unordered_map-100":
      0.018 msecs per iteration (total: 75, iterations: 4096)
RESULT : 
TestItemRepository::testStringHashPerformance():"unordered_map-1000":
      0.25 msecs per iteration (total: 66, iterations: 256)
RESULT : 
TestItemRepository::testStringHashPerformance():"unordered_map-10000":
      3.6 msecs per iteration (total: 59, iterations: 16)
RESULT : 
TestItemRepository::testStringHashPerformance():"unordered_map-100000":
      52.0 msecs per iteration (total: 104, iterations: 2)
RESULT : TestItemRepository::testStringHashPerformance():"qhash-100":
      0.0122 msecs per iteration (total: 100, iterations: 8192)
RESULT : TestItemRepository::testStringHashPerformance():"qhash-1000":
      0.21 msecs per iteration (total: 55, iterations: 256)
RESULT : TestItemRepository::testStringHashPerformance():"qhash-10000":
      3.3 msecs per iteration (total: 53, iterations: 16)
RESULT : TestItemRepository::testStringHashPerformance():"qhash-100000":
      43 msecs per iteration (total: 87, iterations: 2)
PASS   : TestItemRepository::testStringHashPerformance()
PASS   : TestItemRepository::cleanupTestCase()
Totals: 6 passed, 0 failed, 0 skipped
********* Finished testing of TestItemRepository *********

$ uname -a
Linux stone-desktop 3.5.0-19-generic #30-Ubuntu SMP Tue Nov 13 17:48:01 
UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Qt 4.8.4
GCC 4.7.2




More information about the KDevelop-devel mailing list