Sorting Algorithms/Circle Sort: Difference between revisions
Content added Content deleted
Line 334: | Line 334: | ||
! This is the canonical algorithm. However, if you want to |
! This is the canonical algorithm. However, if you want to |
||
! speed it up, count the iterations and when you have approached |
! speed it up, count the iterations and when you have approached |
||
! |
! 0.5*ln(n) iterations, perform a binary insertion sort then exit the loop. |
||
! For smaller sized arrays ~ 2million elements, 0.5*log(n) iterations works better, for larger |
|||
! arrays, take the former suggested number. |
|||
end do |
end do |
||
end subroutine circle_sort |
end subroutine circle_sort |