Commit fe9a28c
committed
secp256k1: No allocs in slow scalar base mult path.
This moves the conversion of the base point represented in Jacobian
coordinates outside of the slow scalar base multiplication path used in
resource constrained environments to avoid unnecessary allocations.
name old time/op new time/op delta
--------------------------------------------------------------------------------
ScalarBaseMultNonConstSlow 91.9µs ± 1% 91.5µs ± 1% ~ (p=0.280 n=10+10)
name old alloc/op new alloc/op delta
--------------------------------------------------------------------------------
ScalarBaseMultNonConstSlow 64.0B ± 0% 0.0B -100.00% (p=0.000 n=10+10)
name old allocs/op new allocs/op delta
--------------------------------------------------------------------------------
ScalarBaseMultNonConstSlow 2.00 ± 0% 0.00 -100.00% (p=0.000 n=10+10)1 parent 2104419 commit fe9a28c
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1224 | 1224 | | |
1225 | 1225 | | |
1226 | 1226 | | |
1227 | | - | |
1228 | | - | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
1229 | 1230 | | |
1230 | 1231 | | |
1231 | | - | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1232 | 1238 | | |
1233 | 1239 | | |
1234 | 1240 | | |
| |||
0 commit comments