RFR: 8360023: Add an insertion sort implementation to Hotspot [v3]
Quan Anh Mai
qamai at openjdk.org
Fri Jun 20 11:02:26 UTC 2025
On Fri, 20 Jun 2025 08:36:31 GMT, Andrew Haley <aph at openjdk.org> wrote:
>>> @jdksjolen Thanks for your suggestion. Actually, I can make it so that a `T*` will satisfy `RandomIt` but there is no need for `RandomIt` right now. It is unfortunate because an iterator will give us more safety net, though.
>>>
>>> I have reverted the `GrowableArrayIterator` changes. Insertion sort is good for small arrays so we can use it for `QuickSort::sort`, too. For a stable sort algorithm, implementing a merge - insertion sort should be the way, there is no need to rush for a stable sort method.
>>
>> Cheers! This looks good to me. Let's see what the rest of the community thinks.
>
>> Cheers! This looks good to me. Let's see what the rest of the community thinks.
>
> I'm happy to approve it with a few minor changes.
Thanks for the reviews @theRealAph , I have addressed them.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25895#issuecomment-2990984665
More information about the hotspot-dev
mailing list