Hash computations allocates far to much temporary memory exhausting all system resources and requiring multiple GC runs per hash computation.
A memory profiler easily reports this issue:

An optimized version is available in the fork https://github.com/haumacher/argon2-java reducing the temporary memory consumption in this example by nearly a factor (!) of 25:

Needless to say that the hash computation performance also greatly benefits from this optimization, limiting the overhead of the Java implementation to less than 20% in most cases.
Hash computations allocates far to much temporary memory exhausting all system resources and requiring multiple GC runs per hash computation.
A memory profiler easily reports this issue:
An optimized version is available in the fork https://github.com/haumacher/argon2-java reducing the temporary memory consumption in this example by nearly a factor (!) of 25:
Needless to say that the hash computation performance also greatly benefits from this optimization, limiting the overhead of the Java implementation to less than 20% in most cases.