diff options
author | hjk <qtc-committer@nokia.com> | 2011-03-16 16:02:56 (GMT) |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2011-03-16 16:02:56 (GMT) |
commit | 65ae717b2c8fc979ccb30c967335999a6d90eb4f (patch) | |
tree | d5fcac2ca0d3da3524460ce398add5549e479dcf /src/corelib/tools/qhash.cpp | |
parent | 59e1092c5d6a748f8d144b1decadde2dfcb3f7cc (diff) | |
download | Qt-65ae717b2c8fc979ccb30c967335999a6d90eb4f.zip Qt-65ae717b2c8fc979ccb30c967335999a6d90eb4f.tar.gz Qt-65ae717b2c8fc979ccb30c967335999a6d90eb4f.tar.bz2 |
corelib/tools: Add two ### Qt 5 comments
A proposol to speed up qHash(QString) and QVector.
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 66ec660..b6ba8b2 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -54,6 +54,10 @@ QT_BEGIN_NAMESPACE + +// ### Qt 5: see tests/benchmarks/corelib/tools/qhash/qhash_string.cpp +// Hashing of the whole string is a waste of cycles. + /* These functions are based on Peter J. Weinberger's hash function (from the Dragon Book). The constant 24 in the original function |