Javascript的执行的Array.sort?Javascript、Array、sort

2023-09-10 22:24:05 作者:站在小三婚礼上唱《咆哮》

这算法确实JavaScript的阵列#排序()函数的使用?据我所知,它可以采取的参数和功能,所有的方式来执行各种不同的种类,我只是感兴趣的算法香草排序使用。

Which algorithm does the JavaScript Array#sort() function use? I understand that it can take all manner of arguments and functions to perform different kinds of sorts, I'm simply interested in which algorithm the vanilla sort uses.

推荐答案

如果你看一下这个错误 224128 ,看来归并正在使用由Mozilla

If you look at this bug 224128, it appears that MergeSort is being used by Mozilla.