Withdrawn: 8360023: Add an insertion sort implementation to Hotspot

duke duke at openjdk.org
Wed Aug 27 16:57:50 UTC 2025


On Thu, 19 Jun 2025 11:05:26 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

> 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. Additionally, since insertion sort is the most efficient sorting algorithm for small arrays, it can be used in non-stable sort as well.
> 
> 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.
> 
> [JDK-8360032](https://bugs.openjdk.org/browse/JDK-8360032) is a follow-up work that will build a stable merge-insertion sort on top of this PR.
> 
> Please take a look and share your thoughts. Thanks very much.

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/25895


More information about the hotspot-dev mailing list