2 ms·
Because with a half-decent sorting algorithm you wouldn't need to use multithreading for this? On my machine with that particular 50k length array it takes 7ms
by TheLoneWolfling 12y ago
Because with a half-decent sorting algorithm you wouldn't need to use multithreading for this?
On my machine with that particular 50k length array it takes 7ms if I just do "a.sort();".
- mackwic 12y agoHey ! Bubble sort can be a descent algorithm when you know when and how to use it ! After all, it is the fastest sorting algorithm when your collection is already sorted ! Moreover, it has very nice properties which make it suitable for a lot of concurrent operations.
- TheLoneWolfling 12y agoInsertion sort is faster for already-sorted data. (Note: I am not advocating to use insertion sort!)