Speed up QV4::InternalClass
authorLars Knoll <lars.knoll@digia.com>
Mon, 24 Jun 2013 13:20:13 +0000 (15:20 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 28 Jun 2013 12:55:39 +0000 (14:55 +0200)
commit9b72f5780d2a034fc5a7d103b948b29af2714b9c
tree50a48bcf2869474edbbf562336a5b34f6b578e0f
parent73649e80c03872851f3b5ad96e061d1b347612b5
Speed up QV4::InternalClass

the old code used QHash to store the id to index
mapping, which got detached whenever a new internal
class gets created.

Replace this with a much cheaper custom made hash table.
The new hash table actually doesn't require a detach for
the first transition to a new internal class. This saves
significant memory and time esp. for very large objects
such as the Qt object.

Change-Id: Id1e3af4db59cff39d44ff1c211d46f37ff117ea6
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/qml/v4/qv4global_p.h
src/qml/qml/v4/qv4internalclass.cpp
src/qml/qml/v4/qv4internalclass_p.h