Skip to content

ES2019 stable Array.sort() #1151

@gbrail

Description

@gbrail

The greater JavaScript community got excited a while back because "all major JavaScript implementations" have implemented a stable sort for Array.sort().

Rhino, however, has its own sorting implementation in the "Sorting" class that's not stable, as it uses a hybrid quicksort / insertion sort. I realize that this is no longer the state of the art.

(Rhino cannot use the "Collections.sort()" functionality in Java because it does not handle misbehaved comparators in a way that is compatible with the JavaScript specs.)

A great project for an eager computer scientist would be to improve this sorting algorithm.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ecma IncompatibilityIssues about Rhino being incompatible with the EcmaScript specgood first issueGreat place to start if you're looking to start an open source "resume"

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions