On Wed, 28 Aug 2024 09:06:48 GMT, Per Minborg <pminb...@openjdk.org> wrote:
> then maybe a loop suffices and the code is simple? We have tried a loop, but sadly the performance is not great if the number of iteration is small. This is due to the fact that long loops are split into two loops, and outer and an inner, where the inner loop works up to `Integer.MAX_SIZE`. While this strategy pays off for bigger iterations, it doesn't for very small ones. The C2 optimizations currently have a cutoff point, but it's possible that this point is set too high. This is being discussed with @rwestrel ------------- PR Comment: https://git.openjdk.org/jdk/pull/20712#issuecomment-2315107066