RFR (S) 8035974: Refactor DigestBase.engineUpdate() method for better code generation by JIT compiler
anthony.scarpino at oracle.com
Fri May 23 14:25:50 UTC 2014
This looks fine to me
> On May 21, 2014, at 4:34 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:
> Contributed by James Cheng and modified by me.
> To use intrinsics to accelerate SHA operations on multiple blocks , it is needed to pull a loop out of DigestBase.engineUpdate() and make a new method implCompressMultiBlock() which contains only the loop and can be intrinsified.
> On platforms which does not use intrinsic implCompressMultiBlock() method will be inlined by JIT and the same code will be generated as before. So no performance regression with the pure Java SUN provider is expected.
> About arithmetic change. limit = ofs + len will not overflow integer because ofs <= b.length - len (there is check).
> Tested with jdk jtreg tests and new hotspot jtreg test James wrote for 8035968.
>  https://bugs.openjdk.java.net/browse/JDK-8035968
More information about the core-libs-dev