Skip to content

Explore hash-smith for implementing Hash and Set #9394

Description

@headius

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions