X 归档 2018-09-03
Array.prototype.sort is now stable in @v8js v7.0 / Chrome 70! 🎉
Previously, V8 used an unstable QuickSort for arrays with more than 10 elements. Now, we use the stable TimSort algorithm.
Demo: https://mathiasbynens.be/demo/sort-stability
Previously, V8 used an unstable QuickSort for arrays with more than 10 elements. Now, we use the stable TimSort algorithm.
Demo: https://mathiasbynens.be/demo/sort-stability
Array.prototype.sort 在 @v8js v7.0 / Chrome 70 中现在是稳定的了!🎉
此前,V8 对超过 10 个元素的数组使用不稳定的 QuickSort。现在我们改用稳定的 TimSort 算法。
演示:
此前,V8 对超过 10 个元素的数组使用不稳定的 QuickSort。现在我们改用稳定的 TimSort 算法。
演示:

