Skip to content

performance: Replace DJB2 with xxHash (#3) #63

@AlexJuca

Description

@AlexJuca

Context

The current hash function is DJB2. Replacing it with xxHash or another high-quality fast hash may improve distribution and throughput, especially as table sizes and workloads grow.

Scope

  • Benchmark DJB2 against xxHash or another candidate using representative FKVS key distributions.
  • Evaluate collision behavior, CPU cost, and dependency impact.
  • Decide whether to vendor a small implementation or add a dependency.
  • Keep hash behavior deterministic across supported platforms.

Acceptance criteria

  • Benchmark data justifies the replacement.
  • Collision behavior improves or remains acceptable across realistic key sets.
  • Tests cover basic hash-table correctness after replacement.
  • The change does not regress portability or build simplicity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions