On Tue, 20 Oct 2026 08:43:08 GMT, Shawn Emery <[email protected]> wrote:

>> src/java.base/share/classes/sun/security/util/math/intpoly/IntegerPolynomialP384.java
>>  line 230:
>> 
>>> 228:      * @param r [out] the product of the limbs operands that is fully 
>>> reduced.
>>> 229:      */
>>> 230:     protected void mult(long[] a, long[] b, long[] r) {
>> 
>> checked.
>> 
>> (on a sidenote: I was disappointed at our loop optimizer.. this is exactly 
>> the sort of thing it should  had detected? Perhaps there is a good reason 
>> why we need to bother unrolling this manually, because it does nothing for 
>> readability. But perf gain is surprisingly big for doing something the 
>> compiler should know how to do)
>
> 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)

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33193#discussion_r4326865113

Reply via email to