Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btcec: Optimize pre-computed table load.
This commit modifies the pre-computed table used to optimize the secp256k1 scalar multiplication to a string instead of a byte slice. This change makes the compile more efficient since the Go compiler internally represents bytes slices inefficiently. This reduces the memory needed to compile btcec to 3MB versus the previous 40MB before this change. In addition, it modifies the code which loads the pre-computed table to deserialize directly into the table instead of into locals that are then copied. Fixes #297.
- Loading branch information
Showing
4 changed files
with
10 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.