RFR: 8360023: Add an insertion sort implementation to Hotspot [v4]
Cesar Soares Lucas
cslucas at openjdk.org
Sat Jun 21 04:34:35 UTC 2025
On Fri, 20 Jun 2025 03:01:07 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> src/hotspot/share/utilities/sort.hpp line 57:
>>
>>> 55: // backward)
>>> 56: T* prev = pos - 1;
>>> 57: if (comp(*prev, current_elem) <= 0) {
>>
>> NIT: would be better to pass pointers here?
>
> A `comp` usually receives references. Practically, it is almost the same as receiving pointers.
Apologies, I didn't notice it was a reference.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25895#discussion_r2159860763
More information about the hotspot-dev
mailing list