diff options
author | Robin Burchell <robin.burchell@collabora.com> | 2012-01-18 18:02:24 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-20 12:42:27 +0100 |
commit | 8060dd3c42982543b2b5949187fa5b5bb6aeff29 (patch) | |
tree | 74c0f26dad9ca8d817ed4d2eb0c8394b17f4dcb0 /src/plugins | |
parent | 03700a293ea59eb9b6f2298d3462dce989f5e5ee (diff) |
Add a string hash implementation similar to the one in Java.
This uses a similar runtime to the approach of sampling part of the string, with
the benefit that it doesn't reduce the sampling to subsections of the string.
Ironically, Java used to only sample parts of the string as well, but found that
it produced too many collisions with certain string types, so they moved to use
this method.
RESULT : tst_QHash::qhash_qt4():
0.0537 msecs per iteration (total: 110, iterations: 2048)
PASS : tst_QHash::qhash_qt4()
RESULT : tst_QHash::qhash_faster():
0.015 msecs per iteration (total: 62, iterations: 4096)
PASS : tst_QHash::qhash_faster()
RESULT : tst_QHash::javaString():
0.016 msecs per iteration (total: 66, iterations: 4096)
Change-Id: Icb5da341ab6445163f4217650a0bdb3903e50210
Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/plugins')
0 files changed, 0 insertions, 0 deletions