diff options
author | Lars Knoll <[email protected]> | 2015-01-20 10:04:35 +0100 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2015-01-20 13:29:56 +0100 |
commit | 4690cc0cd3afa3bb0361da2b01834762b6c69646 (patch) | |
tree | ddf4b0e1ce9d7b71e3c6e32fe89887f774edcf46 /src/qml | |
parent | 940e4a85e452b384869aef1da65ac785e3ce1846 (diff) |
Remove not required std::vector::reserve() calls
These actually force more reallocations of the vector than
required, and slow things down in practice.
callgrind shows that this saves around 7% of the total instruction
count for crypto.js
Change-Id: Ibd6114d84ade2b484a5261b53c3299f48f79e633
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'src/qml')
-rw-r--r-- | src/qml/compiler/qv4ssa.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp index f47839f061..924a5d8407 100644 --- a/src/qml/compiler/qv4ssa.cpp +++ b/src/qml/compiler/qv4ssa.cpp @@ -1079,7 +1079,6 @@ private: void ensure(Temp *newTemp) { if (_defUses.size() <= newTemp->index) { - _defUses.reserve(newTemp->index + _defUses.size() / 3 + 1); _defUses.resize(newTemp->index + 1); } } @@ -1088,7 +1087,6 @@ private: { Q_ASSERT(s->id() >= 0); if (static_cast<unsigned>(s->id()) >= _usesPerStatement.size()) { - _usesPerStatement.reserve(s->id() + _usesPerStatement.size() / 3 + 1); _usesPerStatement.resize(s->id() + 1); } } |