is Array.prototype.sort() stable in JavaScript?
2022年5月1日小于 1 分钟
is Array.prototype.sort() stable in JavaScript?
Question
ECMAScript Spec requires Array.prototype.sort() to be stable, but actually Chrome V8 only made it stable in 2018, 10 years after the issue was reported.
The detail of what algorithm is used in V8 is worth well reading.