Skip to content

Creating a secp context in to_public_key is expensive when deriving many elements #847

Description

@RCasatta

let secp = Secp256k1::verification_only();

I am generating a lot of script pubkeys from a descriptor and creating the context every time is pretty expensive (about 20 microseconds each)

Clearly is convenient not passing the secp context in the API in most cases that are not requiring generating a lot of scripts/address so I am not sure how to improve this but I wanted to point this out

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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