Talk:SortingDemo/@comment-4674838-20121022082414

Firefox 16.0, more logs of  tanking in the speed comparison test

Note: A good portion of this speed difference is probably because  is a library method and must be called with a comparator argument, e.g.   (otherwise it would sort the numbers lexographically as strings, which is not what I want here). That function call on the comparator is a lot of overhead and can slow things down considerably.

All of my sorting methods use the built in <, >, === operators for comparison. While this means my methods aren't general enough to sort all types of data, they will handle integers very efficiently. Array size    Data type     NativeSort     MergeSort     QuickSort ---  1000000       Integer           4689           507           237 1000000      Integer           4619           478           228 1000000      Integer           4623           480           223 1000000      Integer           4496           480           226 1000000      Integer           4494           467           230 1000000      Integer           4610           471           236 1000000      Integer           4608           483           226 1000000      Integer           4603           490           224 1000000      Integer           4663           483           222 1000000      Integer           4609           501           232 1000000      Integer           4628           475           227 1000000      Integer           4666           468           231 1000000      Integer           4510           479           234 1000000      Integer           4625           475           230 1000000      Integer           4615           474           227 1000000      Integer           4624           468           229 1000000      Integer           4511           475           237