On Tue, 11 Jun 2024 18:21:49 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:

>> okay
>
> Could you try using MethodHandles instead of b2lLittle? Similar to what's 
> used in ChaCha20:
> https://github.com/openjdk/jdk/blob/b77bd5fd6a6f7ddbed90300fba790da4fb683275/src/java.base/share/classes/com/sun/crypto/provider/ChaCha20Cipher.java#L132-L134
> 
> with MethodHandles you could drop longBuf, removing unnecessary allocation on 
> the only platform where the intrinsic is implemented (MacOSX-aarch64)

b2lLittle() and l2bLittle() are using those MethodHandle stuff, but yes, it 
adds some more performance if I use them directly in this class, so I changed 
it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19632#discussion_r1637007344

Reply via email to