RFR: JDK-8216437 : PPC64: Add intrinsic for GHASH algorithm [v31]

Suchismith Roy sroy at openjdk.org
Mon Apr 28 13:03:59 UTC 2025


On Thu, 24 Apr 2025 14:13:50 GMT, Suchismith Roy <sroy at openjdk.org> wrote:

>> JBS Issue : [JDK-8216437](https://bugs.openjdk.org/browse/JDK-8216437)
>> 
>> Currently acceleration code for GHASH is missing for PPC64. 
>> 
>> The current implementation utlilises SIMD instructions on Power and uses Karatsuba multiplication for obtaining the final result.
>
> Suchismith Roy has updated the pull request incrementally with one additional commit since the last revision:
> 
>   masm

With my changes 



Benchmark | Data Method | Data Size | Key Length | Provider | Mode | Cnt | Score | Error | Units
-- | -- | -- | -- | -- | -- | -- | -- | -- | --
AESGCMByteBuffer.decrypt | direct | 1024 | 128 |   | thrpt | 8 | 192164.655 | ±2499.922 | ops/s
AESGCMByteBuffer.decrypt | direct | 1500 | 128 |   | thrpt | 8 | 138590.675 | ±1718.893 | ops/s
AESGCMByteBuffer.decrypt | direct | 4096 | 128 |   | thrpt | 8 | 60015.129 | ±516.554 | ops/s
AESGCMByteBuffer.decrypt | direct | 16384 | 128 |   | thrpt | 8 | 15705.840 | ±101.889 | ops/s
AESGCMByteBuffer.decrypt | heap | 1024 | 128 |   | thrpt | 8 | 234618.808 | ±3508.043 | ops/s
AESGCMByteBuffer.decrypt | heap | 1500 | 128 |   | thrpt | 8 | 153490.970 | ±1991.507 | ops/s
AESGCMByteBuffer.decrypt | heap | 4096 | 128 |   | thrpt | 8 | 59706.883 | ±393.104 | ops/s
AESGCMByteBuffer.decrypt | heap | 16384 | 128 |   | thrpt | 8 | 15282.959 | ±35.228 | ops/s
AESGCMByteBuffer.decryptMultiPart | direct | 1024 | 128 |   | thrpt | 8 | 169563.728 | ±3262.014 | ops/s
AESGCMByteBuffer.decryptMultiPart | direct | 1500 | 128 |   | thrpt | 8 | 125917.360 | ±2171.133 | ops/s
AESGCMByteBuffer.decryptMultiPart | direct | 4096 | 128 |   | thrpt | 8 | 57233.798 | ±1219.124 | ops/s
AESGCMByteBuffer.decryptMultiPart | direct | 16384 | 128 |   | thrpt | 8 | 15314.450 | ±267.215 | ops/s
AESGCMByteBuffer.decryptMultiPart | heap | 1024 | 128 |   | thrpt | 8 | 199834.254 | ±2929.256 | ops/s
AESGCMByteBuffer.decryptMultiPart | heap | 1500 | 128 |   | thrpt | 8 | 143659.707 | ±2019.578 | ops/s
AESGCMByteBuffer.decryptMultiPart | heap | 4096 | 128 |   | thrpt | 8 | 57676.269 | ±760.886 | ops/s
AESGCMByteBuffer.decryptMultiPart | heap | 16384 | 128 |   | thrpt | 8 | 14899.282 | ±194.883 | ops/s
AESGCMByteBuffer.encrypt | direct | 1024 | 128 |   | thrpt | 8 | 217833.792 | ±2839.966 | ops/s
AESGCMByteBuffer.encrypt | direct | 1500 | 128 |   | thrpt | 8 | 152150.607 | ±2203.853 | ops/s
AESGCMByteBuffer.encrypt | direct | 4096 | 128 |   | thrpt | 8 | 60091.726 | ±812.084 | ops/s
AESGCMByteBuffer.encrypt | direct | 16384 | 128 |   | thrpt | 8 | 15720.273 | ±85.991 | ops/s
AESGCMByteBuffer.encrypt | heap | 1024 | 128 |   | thrpt | 8 | 218901.548 | ±2687.554 | ops/s
AESGCMByteBuffer.encrypt | heap | 1500 | 128 |   | thrpt | 8 | 153527.621 | ±1816.675 | ops/s
AESGCMByteBuffer.encrypt | heap | 4096 | 128 |   | thrpt | 8 | 58896.329 | ±1637.968 | ops/s
AESGCMByteBuffer.encrypt | heap | 16384 | 128 |   | thrpt | 8 | 15226.399 | ±17.957 | ops/s
AESGCMByteBuffer.encryptMultiPart | direct | 1024 | 128 |   | thrpt | 8 | 197339.940 | ±2428.986 | ops/s
AESGCMByteBuffer.encryptMultiPart | direct | 1500 | 128 |   | thrpt | 8 | 136931.341 | ±2782.111 | ops/s
AESGCMByteBuffer.encryptMultiPart | direct | 4096 | 128 |   | thrpt | 8 | 59652.962 | ±750.375 | ops/s
AESGCMByteBuffer.encryptMultiPart | direct | 16384 | 128 |   | thrpt | 8 | 15667.096 | ±58.490 | ops/s
AESGCMByteBuffer.encryptMultiPart | heap | 1024 | 128 |   | thrpt | 8 | 214639.739 | ±4077.556 | ops/s
AESGCMByteBuffer.encryptMultiPart | heap | 1500 | 128 |   | thrpt | 8 | 155557.214 | ±2422.094 | ops/s
AESGCMByteBuffer.encryptMultiPart | heap | 4096 | 128 |   | thrpt | 8 | 58895.472 | ±1538.650 | ops/s
AESGCMByteBuffer.encryptMultiPart | heap | 16384 | 128 |   | thrpt | 8 | 15038.955 | ±44.792 | ops/s
AESGCMByteBuffer.small.decrypt | direct | 1024 | 128 |   | thrpt | 8 | 192555.048 | ±3710.757 | ops/s
AESGCMByteBuffer.small.decrypt | heap | 1024 | 128 |   | thrpt | 8 | 235177.894 | ±4321.018 | ops/s
AESGCMByteBuffer.small.decryptMultiPart | direct | 1024 | 128 |   | thrpt | 8 | 167625.340 | ±2418.147 | ops/s
AESGCMByteBuffer.small.decryptMultiPart | heap | 1024 | 128 |   | thrpt | 8 | 200193.172 | ±3319.042 | ops/s
AESGCMByteBuffer.small.encrypt | direct | 1024 | 128 |   | thrpt | 8 | 216340.878 | ±4651.345 | ops/s
AESGCMByteBuffer.small.encrypt | heap | 1024 | 128 |   | thrpt | 8 | 231760.813 | ±4271.094 | ops/s
AESGCMByteBuffer.small.encryptMultiPart | direct | 1024 | 128 |   | thrpt | 8 | 195748.230 | ±5825.305 | ops/s
AESGCMByteBuffer.small.encryptMultiPart | heap | 1024 | 128 |   | thrpt | 8 | 215594.033 | ±4254.075 | ops/s

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

PR Comment: https://git.openjdk.org/jdk/pull/20235#issuecomment-2835168294


More information about the hotspot-dev mailing list