What is this sort called?
Stefan Koch
uplink.coder at googlemail.com
Sat Aug 28 01:18:03 UTC 2021
On Friday, 27 August 2021 at 19:25:46 UTC, Dennis wrote:
> On Friday, 27 August 2021 at 15:02:59 UTC, Stefan Koch wrote:
>> I've come across a sorting algorithm ato build up a sorted
>> array and I am not sure what it's called.
>
> I don't think it has a name, it looks like insertion sort with
> an ad-hoc optimization that it tries to guess where to insert
> based on the input being mostly monotonically increasing.
I was guessing that it's some insertion sort.
Comparing it with a generic insertion sort without the
optimization it does quite well.
More information about the Digitalmars-d
mailing list