diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 4 | ||||
-rw-r--r-- | src/corelib/tools/qvector.h | 2 |
2 files changed, 6 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 diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 56d1cca..9418642 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -115,6 +115,8 @@ class QVector }; public: + // ### Qt 5: Consider making QVector non-shared to get at least one + // "really fast" container. See tests/benchmarks/corelib/tools/qvector/ inline QVector() : d(&QVectorData::shared_null) { d->ref.ref(); } explicit QVector(int size); QVector(int size, const T &t); |