RFR: 8365581: Optimize Java implementation of P256 arithmetic
altrisi
duke at openjdk.org
Thu Aug 21 16:43:28 UTC 2025
On Fri, 15 Aug 2025 01:01:01 GMT, Ben Perez <bperez at openjdk.org> wrote:
> There are several places where MontgomeryIntegerPolynomialP256.mult() can be optimized. In particular, since modulus[2] = 0 several multiplications can be removed. Other multiplications can be replaced by shifts, which also saves time. Preliminary tests indicate an improvement between 5-10%.
Would it make sense to mark the arrays (modulus) as `@Stable`, to let the compiler constant-fold its values and maybe find similar optimizations by itself? (assuming it's available here)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26792#issuecomment-3191543058
More information about the security-dev
mailing list