The HashSmith library by @bluuewhale is a new implementation of space-efficient open-addressing hashes for Java, with a SWAR implementation by default and a Java Vector API-based version when that API is available.
It is also small and licensed under the MIT license.
This could be the base implementation code we need to finally switch our RubyHash and RubySet to fast, concurrent, compact implementations.
I took a quick look through the code, and the biggest change we would need to make would be to allow overriding the hashing and equality-checking logic to do more efficient dynamic calls and to allow switching to identity hashing on demand (as a one-way operation). This probably would not be possible to do without copying the library into JRuby and making the modifications directly, as the hashing logic is currently private and not overridable.
https://github.com/bluuewhale/hash-smith
The HashSmith library by @bluuewhale is a new implementation of space-efficient open-addressing hashes for Java, with a SWAR implementation by default and a Java Vector API-based version when that API is available.
It is also small and licensed under the MIT license.
This could be the base implementation code we need to finally switch our RubyHash and RubySet to fast, concurrent, compact implementations.
I took a quick look through the code, and the biggest change we would need to make would be to allow overriding the hashing and equality-checking logic to do more efficient dynamic calls and to allow switching to identity hashing on demand (as a one-way operation). This probably would not be possible to do without copying the library into JRuby and making the modifications directly, as the hashing logic is currently private and not overridable.
https://github.com/bluuewhale/hash-smith