This updates the field normalization code to better secure against the possibility of non-constant time operations due to branch prediction and adds several tests to ensure the new logic is sound. The following benchmark results show that this implementation is within the margin of error for it to not be statistically relevant and thus has no performance impact. name old time/op new time/op delta ---------------------------------------------------------------------- FieldNormalize 22.1ns ± 1% 22.1ns ± 1% ~ (p=0.873 n=5+5) |
||
|---|---|---|
| .. | ||
| edwards | ||
| secp256k1 | ||
| common.go | ||
| go.mod | ||