Comment #33 on issue 90 by [email protected]: V8 doesn't stable sort
http://code.google.com/p/v8/issues/detail?id=90
Complaining on this bug I suspect is only going to result in it being
closed for comments. :) (Not my decision, just speculating.)
The original issue tracked by this bug has long since been resolved. Note
that:
http://trac.webkit.org/export/151505/trunk/LayoutTests/fast/js/comparefn-sort-stability.html
now PASSes in Chrome.
As noted in Comment 12, small array sorts are stable. Only large array
sorts are unstable in v8 (or at least were last I knew).
It's possible that the compatibility landscape has changed since this bug
was originally filed.
I suspect that *if* all other modern browsers (Firefox, Safari, IE 10) use
a stable sort already for large arrays there is an argument that v8 may
need to do so for compatibility. It's not clear in this bug if that's the
case. Instead of adding additional "me too" comments, I suspect it's more
useful for someone to write (or find) a comprehensive test of sort
stability (for various array sizes) and run it against other modern
browsers and report the results.
Since the ECMAScript/JavaScript spec does not require Array.sort to be
stable, there is no need for v8's sort to be stable *unless* web
compatibility dictates otherwise. So long as there is at least one other
major browser with an unstable sort, I see no reason for v8 to change
Array.sort to be stable. I would personally like Array.sort to be stable
or at least for JavaScript to provide an optionally stable sort (as I've
run into this bug writing web apps in the past) But that's a personal
preference, not my professional judgement.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.