diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-05-20 09:43:52 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-05-20 13:19:25 +0200 |
commit | 5bb746520db70b09de463f0ce27ecfbe3e5dfb4f (patch) | |
tree | 932a287c2e834dfcb4fb83839fcb10b4f8a50b6d /src/qml/jsruntime/qv4function.cpp | |
parent | ae1334d827bd386ae34ed5fca8f00dcef83bc65e (diff) | |
download | qtdeclarative-5bb746520db70b09de463f0ce27ecfbe3e5dfb4f.tar.gz |
Use QHash instead of QMap for resolved types
This vastly speeds up resolved type reference lookups in
QQmlObjectCreator::createInstance, which translates to significant
improvements in qmlbench:
perf record -b ./src/qmlbench --shell frame-count delegates_qobject.qml
went from roughly 730 frames to > 800 locally.
To have a stable order in the hash, we simply sort a tempory vector of
keys. As this happens only once, the overhead is negligible and
partially offset by the better memory locality of the QHash anyway.
Task-number: QTBUG-88672
Change-Id: Ib547a87fd0d2d81f366ea927ade232f33b3d3788
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4function.cpp')
0 files changed, 0 insertions, 0 deletions