Reduce the amount of runtime-initialized constants #191

pull sipa wants to merge 3 commits into bitcoin-core:master from sipa:scalarconst changing 18 files +150 −309
  1. sipa commented at 10:21 pm on January 21, 2015: contributor
    Instead of having per-subsystem context that gets initialized at runtime, use some macros to write them directly as C static consts. Less code, faster, more readable.
  2. sipa renamed this:
    Convert the scalar constant initialization to static consts
    Reduce the amount of runtime-initialized constants
    on Jan 21, 2015
  3. sipa force-pushed on Jan 22, 2015
  4. gmaxwell commented at 6:51 am on January 22, 2015: contributor

    Dogmatic macro hygiene nit: Macro variables should always be parenthesized lest someone change whats passed in and cause a really-surprising-parsing incident.

    (I probably wouldn’t comment for this but I know eventually– once the code is strictly C89– I’ll run some static analysis tool on the codebase that whines because of CERT PRE01-C or MIRSA-C rule 96)

  5. sipa force-pushed on Jan 23, 2015
  6. sipa commented at 3:30 am on January 23, 2015: contributor
    @gmaxwell Nit addressed.
  7. sipa force-pushed on Jan 23, 2015
  8. gmaxwell commented at 3:43 am on January 23, 2015: contributor
    ACK
  9. Convert the scalar constant initialization to static consts f1ebfe399f
  10. Remove unused secp256k1_fe_inner_{start, stop} functions 19f3e76002
  11. Convert the field/group/ecdsa constant initialization to static consts 4732d26069
  12. sipa force-pushed on Jan 23, 2015
  13. sipa merged this on Jan 23, 2015
  14. sipa closed this on Jan 23, 2015

  15. sipa referenced this in commit a9f350d309 on Jan 23, 2015


sipa gmaxwell


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-22 22:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me