Skip to content

Is the hasher thread safe ? #3

@chmike

Description

@chmike

Your hasher is definitely the faster hasher I could find. Congratulations. It hashes the string "The brown fox jumps over the fence" in 3.5ns.
Unfortunately, your hasher doesn't support byte slices as they are not comparable. It would be nice if you could add this possibility.

The go "hash/mapshash" hashes the same string in 6.6ns, but in a thread safe way.

Your maphash is thus roughly twice faster than the go hash/maphash. Unfortunately, it doesn't accept byte slices.

One critical question for my use case is if your hasher is thread safe ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions