Comment #35 on issue 90 by [email protected]: V8 doesn't stable sort
http://code.google.com/p/v8/issues/detail?id=90
In any case, V8 is completely spec compliant on this issue. It implements
the spec as performant as possible while maintaining spec compliance. For
additional requirements, it's not hard to add your own implementations.
Additional javascript libraries exist like sand on the beach as well.
If you want to argue that the specification is incomplete, please involve
yourself with the ECMA standard body, for example by posting to es-discuss
(https://mail.mozilla.org/listinfo/es-discuss). Maybe you can convince the
committee to add stable sort the next revision of the specification.
Arguing that moving elements indicates that the algorithm is less
performant is a fallacy. Additionally, the average runtime in big-O
notation may not even matter. You also want to consider worst case
behavior, memory requirements, and fixed overhead. For example, we use
insertion sort for arrays below a certain size because it runs faster even
at O(n^2).
The V8 implementation of sort is done in javascript. If you can come up
with a stable sort that performs equally well or better, we would be very
happy to replace the current implementation. We accept patches!
--
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.