Add benchmark comparing different possible containers for the TypeRepo

Authored by mwolff on Jan 23 2013, 1:22 AM.

Description

Add benchmark comparing different possible containers for the TypeRepo

This was discussed on IRC and I thought it might be interesting. Here
are the numbers for a RelWithDebInfo build on my machine:

RESULT : BenchHashes::typeRepo():"vector":

0.00012 msecs per iteration (total: 67, iterations: 524288)

RESULT : BenchHashes::typeRepo():"vector-raw":

0.00012 msecs per iteration (total: 66, iterations: 524288)

RESULT : BenchHashes::typeRepo():"qhash":

0.0011 msecs per iteration (total: 75, iterations: 65536)

RESULT : BenchHashes::typeRepo():"qmap":

0.0019 msecs per iteration (total: 64, iterations: 32768)

RESULT : BenchHashes::typeRepo():"unordered_map":

0.0018 msecs per iteration (total: 59, iterations: 32768)

So QHash is just one magnitude slower than QVector, and still quite
fast... We might try that out in the future for future proofing the
duchain type registration.

Details

Committed
mwolffJan 23 2013, 1:24 AM
Parents
R32:8978c004e987: SVN_SILENT made messages (.desktop file)
Branches
Unknown
Tags
Unknown