New issue
Advanced search Search tips

Issue 857372 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 852685
issue 856346
issue 896385

Blocking:
issue v8:7382



Sign in to add a comment

Changes in Array.prototype.sort may break existing sites

Project Member Reported by jgruber@chromium.org, Jun 28 2018

Issue description

Since the dawn of time, V8's Array.p.sort has been implemented as a combination of quicksort (with sampling & recursive sorts to determine the pivot for large arrays) and insertion sort. 

Quicksort is not a stable sort algorithm, i.e. the order of equivalent elements ('equivalent' according to the given comparison function) is unspecified.

This sorting behavior has been baked into the web, and some sites may rely on its precise behavior.

Recent changes to Array.p.sort may break these assumptions. I'm opening this issue as a central tracking point.
 
Blocking: v8:7382
Blockedon: 856346
Blockedon: 852685
Status: Fixed (was: Assigned)
Closed for now, will re-open if we discover new breakages.
Blockedon: 896385

Sign in to add a comment