Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

secp256k1: No allocs in slow scalar base mult path. #3225

Merged

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Mar 19, 2024

This is rebased on #3224.

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)

@davecgh davecgh added this to the 1.9.0 milestone Mar 19, 2024
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)
@davecgh davecgh force-pushed the secp256k1_no_allocs_for_slow_base_mult branch from 457ba1d to fe9a28c Compare March 21, 2024 14:35
@davecgh davecgh merged commit fe9a28c into decred:master Mar 21, 2024
2 checks passed
@davecgh davecgh deleted the secp256k1_no_allocs_for_slow_base_mult branch March 21, 2024 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants