You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9bbad8a
Browse filesBrowse the repository at this point in the historyBrowse files
[JSC] TypedArray change-array-by-copy should be C++
https://bugs.webkit.org/show_bug.cgi?id=243162
Reviewed by Alexey Shvayka and Ross Kirsling.
This patch implements TypedArray change-array-by-copy in C++ to get performance boost.
TypedArray has a lot of characteristics of non-dynamic behavior. Since it is typed too,
then we can easily write super fast C++ implementations for these methods.
This patch keeps toSorted in JS while large part of it is implemented in C++ already.
And we also migrate subarray from JS to C++ since we have fast speciesConstruct now.
ToT Patched
typed-array-to-sorted-hot 131.0737+-0.0586 ^ 79.5521+-0.1355 ^ definitely 1.6476x faster
typed-array-subarray-hot 4.5564+-0.2404 ^ 3.5946+-0.0116 ^ definitely 1.2676x faster
typed-array-to-reversed-hot 93.7245+-0.1785 ^ 28.5393+-0.1813 ^ definitely 3.2841x faster
typed-array-with-hot 78.6775+-0.2573 ^ 10.2874+-0.0542 ^ definitely 7.6479x faster
* JSTests/microbenchmarks/typed-array-subarray-hot.js: Added.
* JSTests/microbenchmarks/typed-array-to-reversed-hot.js: Added.
* JSTests/microbenchmarks/typed-array-to-sorted-hot.js: Added.
* Source/JavaScriptCore/builtins/BuiltinNames.h:
* Source/JavaScriptCore/builtins/TypedArrayPrototype.js:
(subarray): Deleted.
(toReversed): Deleted.
* Source/JavaScriptCore/bytecode/LinkTimeConstant.h:
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::speciesConstruct):
(JSC::genericTypedArrayViewProtoFuncToReversed):
(JSC::genericTypedArrayViewProtoFuncToSorted):
(JSC::genericTypedArrayViewProtoFuncSlice):
(JSC::genericTypedArrayViewProtoFuncSubarray):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate): Deleted.
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
(JSC::JSTypedArrayViewPrototype::finishCreation):
* Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.h:
Canonical link: https://commits.webkit.org/252891@main
0 commit comments