Skip to content

Fast API #40

@ronag

Description

@ronag

This repo is currently pretty much 1:1 in terms of performance relative to xxhash-wasm. What could make this faster would be to be implemented with V8 fast api (though it would probably only work with Node then).

benchmark        time (avg)             (min  max)       p75       p99      p999
--------------------------------------------------- -----------------------------
xxhash-wasm   54.96 ns/iter   (50.09 ns  1'243 ns)  54.38 ns  94.16 ns    433 ns
hash-rs         263 ns/iter     (237 ns  2'276 ns)    261 ns    381 ns  2'254 ns
xxhash        60.22 ns/iter   (52.92 ns  4'086 ns)  58.06 ns  68.42 ns  1'145 ns

Otherwise, I don't really see any reason to use this over xxhash-wasm. Other than if you want to the result into a Buffer rather than a BigInt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions