Sorting an array of objects in Chrome

后端 未结 3 1624
傲寒
傲寒 2020-12-01 09:21

EDIT: As noted by kennytm below and after investigating myself, according to the ECMA spec, when two objects are determined to be equal in a custom sort, JavaScript is

3条回答
  •  爱一瞬间的悲伤
    2020-12-01 10:03

    The V8 sort is not stable, unfortunately. I'll see if I can dig up the Chromium bug about this.

    V8 sort is now stable!

提交回复
热议问题