RFR(S) JDK-8205528: Base64 Encode Algorithm using AVX512 Instructions

Vladimir Kozlov vladimir.kozlov at oracle.com
Fri Jun 22 19:29:16 UTC 2018


Hi Smita,

I CCing to Libs to review code changes in Base64.java.

Looks like you changed all need place to implement intrinsic.
One question so: why you have own copy of base64 charsets and not using 
one in library:

          private int encode0(byte[] src, int off, int end, byte[] dst) {
              char[] base64 = isURL ? toBase64URL : toBase64;

Some indents in new and old Assembler::emit_operand() are off.

In new Assembler::emit_operand() is better use } else { instead of 
'return' in one branch.

This is first time I see that XMM register can be used for index in 
address. Is it true? Can you point to Intel's document which describes it.

What testing you did?

Please, add tests to test/hotspot/jtreg/compiler/intrinsics/base64 (may 
be similar to sha or AES in compiler/codegen/aes) to make sure that all 
flags, intrinsic is used and it produces correct result.

I know there is test/jdk/java/util/Base64/ tests but they may not 
trigger intrinsic usage. But you can use them as starting point for new 
tests.

Thanks,
Vladimir

On 6/22/18 11:47 AM, Kamath, Smita wrote:
> Hi Vladimir,
> 
> I’d like to contribute an optimization for Base64 Encoding Algorithm 
> using AVX512 Instructions. This optimization shows 1.5x improvement on 
> x86_64 platform(SKL).
> 
> Link to Bug: https://bugs.openjdk.java.net/browse/JDK-8205528
> 
> Link to webrev: http://cr.openjdk.java.net/~vdeshpande/Base64/webrev.00/
> 
> For testing the implementation, I have run tests under 
> test/jdk/java/util/Base64/ and also ran 
> test/jdk/com/sun/jndi/ldap/Base64Test.java
> 
> I have also run jtreg.
> 
> Please review and let me know if you have any comments.
> 
> Thanks and Regards,
> 
> Smita
> 


More information about the core-libs-dev mailing list