On Sat, 11 Oct 2025 08:39:39 GMT, Tagir F. Valeev <[email protected]> wrote:

>> Vladimir Yaroslavskiy has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   JDK-8266431: Dual-Pivot Quicksort improvements
>>   
>>   * Moved Radix sort out from sorting
>
> src/java.base/share/classes/java/util/DualPivotQuicksort.java line 66:
> 
>> 64:      * Max size of array to use insertion sort.
>> 65:      */
>> 66:     private static final int MAX_INSERTION_SORT_SIZE = 51;
> 
> Was this change justified by benchmarking? Why was the best value different 
> before? Due to hardware changes or due to HotSpot/JIT changes or due to 
> algorithmic changes below?

These changes are  due to algorithmic changes - more optimized insertion sort 
(combination of mixed, pin and simple insertion sortings), therefore we can run 
insertion sort on larger arrays.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27411#discussion_r2453278837

Reply via email to