From 132cdfa69cae45d0c02ea715ce58722bbcd57e73 Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Thu, 18 Dec 2014 12:43:18 +0100 Subject: QV4::InternalClass: reserve space for transitions. Profiling of allocations shows that this is one of the most frequent allocators. Change-Id: Iae0350c61bfe37381577642b9a93064377f45c1d Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4internalclass.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/qml/jsruntime/qv4internalclass.cpp') diff --git a/src/qml/jsruntime/qv4internalclass.cpp b/src/qml/jsruntime/qv4internalclass.cpp index 0f88dd4d5a..c226ceade9 100644 --- a/src/qml/jsruntime/qv4internalclass.cpp +++ b/src/qml/jsruntime/qv4internalclass.cpp @@ -125,6 +125,7 @@ InternalClass::InternalClass(ExecutionEngine *engine) , m_frozen(0) , size(0) { + transitions.reserve(17); } @@ -140,6 +141,7 @@ InternalClass::InternalClass(const QV4::InternalClass &other) , m_frozen(0) , size(other.size) { + transitions.reserve(17); } void InternalClass::changeMember(Object *object, String *string, PropertyAttributes data, uint *index) -- cgit v1.2.3