RFR :7088419 : (L) Use x86 Hardware CRC32 Instruction with java.util.zip.CRC32 and java.util.zip.Adler32

Alan Bateman Alan.Bateman at oracle.com
Fri May 31 06:52:17 PDT 2013

On 31/05/2013 03:17, David Chase wrote:
> Not sure where this stands, given that Vladimir K has a grand plan to turn the assembly language into an intrinsic (this is not how I would normally approach it) but there is another webrev with the unnecessary import removed:
> http://cr.openjdk.java.net/~drchase/7088419/webrev.04/
I guess this comes down to timing and which releases the improvement is 
required in. If the intrinsic that Vladimir is proposing is more longer 
term, and you are looking to get this is so that it can also go into 
jdk7u, then it might be okay to just push your implementation now (as 
the speed-up is compelling). As I mentioned in one of the mails, then 
the passing through of the property to enable it is a bit awkward but 
you explained that detecting the processor feature is complicated and 
the duplication is best avoid. Also the XX option although if this were 
compiled C then the XX option wouldn't have any effect.

Some minor nits on CRC32 in the latest webrev:

- as "javaCRCIfSmallThan" is a constant then it can be final and 
probably renamed to uppercase to be consistent. Looks like timesXtoThe32 
can be final too.
- the static initializer is use 2-space indent whereas we usually use 4

Otherwise I don't have any other issues.

Are you still planning to adding the parallel version?


More information about the hotspot-compiler-dev mailing list