forked from wangwenx190/qtbase
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QHash: Return void from QHashPrivate::Data::erase()
This removes some calculations that are not required in 80% of the cases where d->erase() is being called (as the return value is ignored). When removing lots of elements from the hash, the ++it could loop quite a bit until it found the next valid item in the hash. This chain of changes combined improve the overall performance of QHash by 10-50% depending on the operation. Deletes are twice as fast, reads around 20% faster, inserts around 10% faster. Task-number: QTBUG-91739 Fixes: QTBUG-98436 Change-Id: I2d82a7c9dd1dd0a4da8402e6d95bfd620caeff3a Reviewed-by: Marc Mutz <[email protected]>
- Loading branch information
Showing
1 changed file
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters