Talk:SortingDemo/@comment-4674838-20121022082414/@comment-4674838-20121022084134

Same test, but in Chrome for comparison. Chrome's  seems to be faster than Firefox by a small factor. I believe Chrome uses an unstable sort (probably a quicksort), but Firefox and IE use stable sorts (probably a mergesort). The specification for  doesn't require it to be stable, so different browsers are free to give their own implementation. These all being  sorts, if Chrome is using quicksort that would explain why it's faster, because quicksort generally beats out all other  comparison sorts. (However, my optimized quicksort still wins apparently :) Array size    Data type     NativeSort     MergeSort     QuickSort ---  1000000       Integer           1062           600           277 1000000      Integer           1095           601           276 1000000      Integer           1059           605           274 1000000      Integer           1064           597           278 1000000      Integer           1073           597           269 1000000      Integer           1096           599           275 1000000      Integer           1072           600           272 1000000      Integer           1084           604           269 1000000      Integer           1057           595           269 1000000      Integer           1046           598           269 1000000      Integer           1035           596           275 1000000      Integer           1043           594           269 1000000      Integer           1055           595           270 1000000      Integer           1045           597           268 1000000      Integer           1041           593           271 1000000      Integer           1042           596           274 1000000      Integer           1044           606           270 1000000      Integer           1038           616           270