aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4ssa.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-20 10:04:35 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2015-01-20 13:29:56 +0100
commit4690cc0cd3afa3bb0361da2b01834762b6c69646 (patch)
treeddf4b0e1ce9d7b71e3c6e32fe89887f774edcf46 /src/qml/compiler/qv4ssa.cpp
parent940e4a85e452b384869aef1da65ac785e3ce1846 (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 <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4ssa.cpp')
-rw-r--r--src/qml/compiler/qv4ssa.cpp2
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);
}
}