Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 04c766519a71e85e84f1fbb81b469874553eec96
      
https://github.com/WebKit/WebKit/commit/04c766519a71e85e84f1fbb81b469874553eec96
  Author: Daniel Liu <[email protected]>
  Date:   2025-02-22 (Sat, 22 Feb 2025)

  Changed paths:
    A JSTests/microbenchmarks/sort-custom-comparator.js
    M Source/JavaScriptCore/runtime/StableSort.h

  Log Message:
  -----------
  Improve arrayStableSort using Powersort and binary insertion sort
https://bugs.webkit.org/show_bug.cgi?id=288130
rdar://145235779

Reviewed by Yusuke Suzuki.

Currently, JSC uses mergesort and naive insertion sort to sort a JSArray.
We can improve this by implementing Powersort, and updating our insertion
sort to use binary search to find the insertion position.

tagcloud-SP: average ~3% better (significant with 98% probability)
UniPoker: average ~1% better (significant with 98% probability)

* JSTests/microbenchmarks/sort-custom-comparator.js: Added.
(randArray):
(comparator):
(iteration.i.comparator):
* Source/JavaScriptCore/runtime/StableSort.h:
(JSC::arrayInsertionSort):
(JSC::mergePowersortRuns):
(JSC::arrayStableSort):
(JSC::arrayMerge): Deleted.

Canonical link: https://commits.webkit.org/290894@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to