Array#sort() implementations not interoperable

Fedor Indutny fedor at indutny.com
Mon Dec 3 11:00:35 PST 2012


It's abort stability, and I think it's better to keep it un-stable for
performance performance.



On Mon, Dec 3, 2012 at 10:46 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Jussi Kalliokoski wrote:
>
>> Hello everyone,
>>
>> Reposting, I think my previous attempt got stuck in a filter or
>> something, because I somehow managed to have the code there in several
>> copies.
>>
>
> You have three messages total on this topic at
>
> https://mail.mozilla.org/**pipermail/es-discuss/2012-**December/<https://mail.mozilla.org/pipermail/es-discuss/2012-December/>
>
>
>
>  I was thinking about sorting algorithms yesterday and I realized that ES
>> implementations may have different sorting algorithms in use, and decided
>> to try it out. Now, if you sort strings or numbers, it doesn't matter, but
>> you may be sorting objects by a key and this is where things get nasty
>> (think non-deterministic vs deterministic).
>>
>
> Have you read the language dating from ES3 on Array sort in the spec? In
> particular Array#sort is not guaranteed to be stable. Perhaps it should be.
>
> /be
>
> ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121203/048f3328/attachment.html>


More information about the es-discuss mailing list