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/qv4functionobject.cpp | |
parent | 9bf5e87ef0abd3c4612baca66c79e2d33f8fbfb9 (diff) | |
download | qtdeclarative-ce26bfcb3952dcd1238e7aa07b9ab1d9585c9871.tar.gz |
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/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index aa1cb89a44..8c3131c565 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -348,7 +348,7 @@ ReturnedValue FunctionPrototype::method_apply(CallContext *ctx) ScopedCallData callData(scope, len); if (len) { - if (arr->protoHasArray() || arr->hasAccessorProperty) { + if (!(arr->flags & SimpleArray) || arr->protoHasArray() || arr->hasAccessorProperty) { for (quint32 i = 0; i < len; ++i) callData->args[i] = arr->getIndexed(i); } else { |