RFR: 8360023: Add an insertion sort implementation to Hotspot [v2]
Quan Anh Mai
qamai at openjdk.org
Thu Jun 19 11:39:56 UTC 2025
> Hi,
>
> This PR adds an implementation of insertion sort to Hotspot. It is an algorithm that is inplace and stable, and it is the ideal algorithm for arrays with small numbers of elements. The motivation for this is [JDK-8357186](https://bugs.openjdk.org/browse/JDK-8357186) in which a stable sort is desired and the number of elements is small.
>
> In addition, I make some improvements to `GrowableArrayIterator`:
>
> - Make a non-const variant (our current iterator is const only).
> - Add various utility operators to align with a typical iterator.
>
> Please take a look and share your thoughts. Thanks very much.
Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
fix windows build failures
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25895/files
- new: https://git.openjdk.org/jdk/pull/25895/files/1ff7b27a..32f48e21
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25895&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25895&range=00-01
Stats: 9 lines in 1 file changed: 0 ins; 0 del; 9 mod
Patch: https://git.openjdk.org/jdk/pull/25895.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25895/head:pull/25895
PR: https://git.openjdk.org/jdk/pull/25895
More information about the hotspot-dev
mailing list