Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark existing ways to check for IDENTITY CIDs #135

Merged
merged 1 commit into from Nov 8, 2021

Commits on Nov 8, 2021

  1. Benchmark existing ways to check for IDENTITY CIDs

    Add benchmarks that compare two ways of checking for
    `multihash.IDENTITY` code:
    1. `Cid.Prefix().MhType`
    2. Decode of `Cid.Hash()`
    
    This benchmark illustrates that using Cid.Prefix is more efficient than
    `multihash.Decode`. Users wishing to perform such a check should use
    `Cid.Prefix`.
    
    Consider that `Cid.Prefix` is already efficient enough and introducing a
    dedicated API for performing this check will likely result in small
    gains.
    
    Relates to #133
    masih committed Nov 8, 2021
    Copy the full SHA
    70c228c View commit details
    Browse the repository at this point in the history