Closed sorpaas closed 4 years ago
Can you ELI5 what "static|dynamic context" means in this context?
@dvdplm It's the pre-computed table used to accelerate various calculations. Previously we only allow storing the table as static variables directly in the library. This PR allows disabling those variables (to reduce binary size, if needed) and generate the tables dynamically.
This PR allows disabling those variables (to reduce binary size, if needed) and generate the tables dynamically.
How much bigger is the static vs dynamic build? How much does the table generation cost under normal use?
I think it'd be good to get some of this info into the README to help users decide. :)
How much bigger is the static vs dynamic build? How much does the table generation cost under normal use?
It is reported to be quite significant -- around 1mb or so. I knew some users were discouraged previously from using libsecp256k1
just because of this. I don't have the exact numbers in hand but we can get it later. :)
we can get it later
This changes the static contexts to be a feature that can be enabled or disabled, and allow contexts to be dynamically generated. By disabling static contexts, users accomplish much smaller binary size, but the trade-off is then that contexts must be generated dynamically (which is not a cheap operation).