Bug 239267 - [JSC] Optimize ArrayPrototype.js::sort
Summary: [JSC] Optimize ArrayPrototype.js::sort
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-12 17:33 PDT by Robin Morisset
Modified: 2022-07-04 08:42 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Morisset 2022-04-12 17:33:55 PDT
It currently seems to be a fairly naive merge sort. Making it some kind of Timsort (https://en.wikipedia.org/wiki/Timsort) could be an easy perf win.
Comment 1 Radar WebKit Bug Importer 2022-04-19 17:34:13 PDT
<rdar://problem/91996423>
Comment 2 Raiyan Sayeed 2022-07-04 08:42:33 PDT
Would it make sense to base the Timsort implementation off a full-fledged one (like a Javascript version of the OpenJDK implementation: https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/master/src/java.base/share/classes/java/util/TimSort.java)? Or would it be better to create a more basic implementation?