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.
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-
sipa commented at 10:21 PM on January 21, 2015: contributor
- sipa renamed this:
Convert the scalar constant initialization to static consts
Reduce the amount of runtime-initialized constants
on Jan 21, 2015 - sipa force-pushed on Jan 22, 2015
-
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)
- sipa force-pushed on Jan 23, 2015
- sipa force-pushed on Jan 23, 2015
-
gmaxwell commented at 3:43 AM on January 23, 2015: contributor
ACK
-
Convert the scalar constant initialization to static consts f1ebfe399f
-
Remove unused secp256k1_fe_inner_{start, stop} functions 19f3e76002
-
Convert the field/group/ecdsa constant initialization to static consts 4732d26069
- sipa force-pushed on Jan 23, 2015
- sipa merged this on Jan 23, 2015
- sipa closed this on Jan 23, 2015
- sipa referenced this in commit a9f350d309 on Jan 23, 2015