Updates:
Status: WorkingAsIntended
Comment #2 on issue 324 by erik.corry: Javascript array sort issue
http://code.google.com/p/v8/issues/detail?id=324
The standard and other browsers do not guarantee that there will be no
reordering if the compare function
returns 0. You may have 'got lucky' with this sort, but in general you
have to assume that the sort is not 'stable'.
See http://en.wikipedia.org/wiki/Sorting_algorithm#Stability If you want a
stable sort you have to add the
original position in the array to the objects somehow and include that in
your comparison function.
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---