diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-11-14 11:08:41 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-22 14:54:12 +0100 |
commit | ce26bfcb3952dcd1238e7aa07b9ab1d9585c9871 (patch) | |
tree | e639703f38ff6b7a9407b7951f815ba9e2f11da8 /src/qml/jsruntime/qv4object.cpp | |
parent | 9bf5e87ef0abd3c4612baca66c79e2d33f8fbfb9 (diff) |
Speed up arguments object
Don't fully create the arguments object unless required.
In the 95% use case, we can avoid creating any array based
data structures for the arguments object and directly
manipulate the functions arguments. only create the full
data structure for the other 5%.
Speeds up the raytrace test by 50%, gives around 10% overall
on v8-bench.
Change-Id: If727d28b96585e83314f544031a6c3ca1817ea19
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index cca7d2b26a..e4df95716d 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -1133,7 +1133,7 @@ ReturnedValue Object::arrayIndexOf(const ValueRef v, uint fromIndex, uint endInd Scope scope(engine()); ScopedValue value(scope); - if (!(flags & SimpleArray) || o->protoHasArray() || o->arrayAttributes) { + if (!(o->flags & SimpleArray) || o->protoHasArray()) { // lets be safe and slow for (uint i = fromIndex; i < endIndex; ++i) { bool exists; |