qt5base-lts/tests/auto
Lars Knoll f14559790b Change qHashBits to use MurmurHash2
The old implementation was either using CRC32 on modern processors
or a trivial, but rather slow implementation.

We can't continue with CRC32, as that implementation can only
give us 32bit hashes, where we now need to support 64bit in Qt 6.

Change the implementation to use MurmurHash, as public domain
implementation that is both very fast and leads to well distributed hashes.

This hash function is about as fast as the SSE optimized CRC32 implementation
but works everywhere and gives us 64 bit hash values.

Here are some numbers (time for 10M hashes):

                                         14 char     16 char
                                         QByteArray  QString  float
old qHash (non CRC32)                    127ms       134ms    48ms
old qHash (using SSE CRC32 instructions  60ms        62ms     46ms
new qHash                                52ms        43ms     46ms

Unfortunately MurmurHash is not safe against hash table DoS attacks, as
potential hash collisions are indepenent of the seed. This will get
addressed in followup commit, where we use SipHash or an SSE optimized
AES based hashing algorithm that does not have those issues.

Change-Id: I4fbc0ac299215b6db78c7a0a2a1d7689b0ea848b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 20:03:45 +02:00
..
cmake Remove qt6_use_modules 2020-03-25 08:39:43 +01:00
concurrent Resolve Qt6 TODO items, replace Median and BlockSizeManager 2020-04-09 02:49:18 +02:00
corelib Change qHashBits to use MurmurHash2 2020-04-09 20:03:45 +02:00
dbus New QMetaType representation 2020-02-20 16:11:02 +01:00
gui Change qHash() to work with size_t instead of uint 2020-04-09 20:03:25 +02:00
guiapplauncher
installed_cmake
network Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-04-08 22:04:23 +02:00
opengl Merge remote-tracking branch 'origin/5.15' into dev 2020-03-11 15:34:21 +01:00
other Merge remote-tracking branch 'origin/5.15' into dev 2020-04-08 20:11:39 +02:00
printsupport Regenerate projects one last time before merge 2020-02-12 17:30:49 +00:00
shared QWindowsFontDatabase: Check preferred family names for all fonts 2019-11-29 09:31:21 +01:00
sql QSqlError: Remove deprecated methods 2020-04-06 14:25:12 +02:00
testlib Restructure testlib selftest project 2020-03-24 21:04:43 +01:00
tools Allow declaring QProperty<> based Q_PROPERTYies with a notify signal 2020-04-08 11:26:39 +02:00
widgets Merge remote-tracking branch 'origin/5.15' into dev 2020-04-08 20:11:39 +02:00
xml Merge remote-tracking branch 'origin/5.15' into dev 2020-03-16 18:41:27 +01:00
auto.pro Disable tests with qemu-arm & developer-build configurations in the CI 2019-10-03 15:12:33 +00:00
CMakeLists.txt cmake: Remove APPLE prefix from platform names 2020-03-16 17:57:56 +01:00
network-settings.h Revert "QAbstractSocket: deprecate 'error' member-function" 2020-02-26 23:07:52 +03:00