On Tue, 20 Oct 2026 15:32:39 GMT, Volodymyr Paprotski <[email protected]> wrote:
>> I don't have the numbers for performance gains when unrolling here, but I >> can run them unless you already have. > > No, its ok.. (I had ran that perf exercise when I did montgomery. Loop was > significantly worse, even though 'its the same code'.. I just dont have the > openjdk skills to investigate loop optimizations further. Had I fixed it > there then, you would not had to unroll it now. Oh well) I rolled up multiplication operations in `mult()` and observed approximately an 18% performance degradation. I believe the unrolled version lets C2 keep the accumulator scalars in registers and thereby more efficiently schedule the associated operations, whereas the rolled version may introduce repeated loads and stores for the accumulator object. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33193#discussion_r4331621103
