Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 10ba9a046aec686fc5f8484c3fb875e22506d443
https://github.com/WebKit/WebKit/commit/10ba9a046aec686fc5f8484c3fb875e22506d443
Author: Shu-yu Guo <[email protected]>
Date: 2026-05-07 (Thu, 07 May 2026)
Changed paths:
M Source/JavaScriptCore/runtime/ArrayPrototype.cpp
M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h
M Source/JavaScriptCore/runtime/StableSort.h
Log Message:
-----------
[JSC] Use simple merge for TypedArray.prototype.sort
https://bugs.webkit.org/show_bug.cgi?id=314223
rdar://176291674
Reviewed by Keith Miller and Yusuke Suzuki.
Galloping merge trades code size for sorting performance. Absolute performance
isn't necessary for TypedArray sorting, so recoup some binary size by using a
simple merge for TypedArrays.
On a Release arm64 build, this PR reduces binary size by 955KB.
This is covered by existing sort tests.
* Source/JavaScriptCore/runtime/ArrayPrototype.cpp:
(JSC::sortStableSort):
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewProtoFuncSortImpl):
* Source/JavaScriptCore/runtime/StableSort.h:
(JSC::mergeRunsSimple):
(JSC::arrayStableSort):
Canonical link: https://commits.webkit.org/312803@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications