Skip to content

Commit

Permalink
Better lowmemory feature with precomputed ECMULT
Browse files Browse the repository at this point in the history
  • Loading branch information
devrandom committed Aug 5, 2021
1 parent 12e3c66 commit 4e745eb
Show file tree
Hide file tree
Showing 2 changed files with 1,166 additions and 1 deletion.
4 changes: 3 additions & 1 deletion secp256k1-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ fn main() {
.define("USE_SCALAR_INV_BUILTIN", Some("1"));

if cfg!(feature = "lowmemory") {
base_config.define("ECMULT_WINDOW_SIZE", Some("4")); // A low-enough value to consume neglible memory
base_config.define("ECMULT_WINDOW_SIZE", Some("4")) // A low-enough value to consume neglible memory
.include("depend/config")
.define("USE_ECMULT_STATIC_PRECOMPUTATION", Some("1"));
} else {
base_config.define("ECMULT_WINDOW_SIZE", Some("15")); // This is the default in the configure file (`auto`)
}
Expand Down
Loading

0 comments on commit 4e745eb

Please sign in to comment.