On Tue, 10 Oct 2023 20:14:51 GMT, iaroslavski <d...@openjdk.org> wrote:

> Is ok that partitionDualPivot, partitionSinglePivot and mixedInsertionSort, 
> insertionSort are annotated differently?

Good question. Someone familiar with this Java code should answer.

Note,  **@forceinline** annotation is used by C2 JIT compiler when it decide to 
inline. One criteria is the bytecode size (we don't want inline huge method 
into another compilation). Default value is 35. With **@forceinline** the size 
will be **1** - most likely guarantee inlining.
But there is drawback, if java method is not "hot" (not called frequently) the 
inlined code may lead to not optimal code generation.
Use it carefully.

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

PR Comment: https://git.openjdk.org/jdk/pull/16124#issuecomment-1756334136

Reply via email to