starkware-libs / starkware-crypto-utils

Signatures, keys and Pedersen hash on STARK friendly elliptic curve
Apache License 2.0
54 stars 37 forks source link

refactor: optimize `pedersen` function #17

Closed nir11 closed 7 months ago

nir11 commented 10 months ago

Description of the Changes

Replaced x = x.shrn(1) with x.iushrn(1) to perform an in-place unsigned right-shift operation. No new BN instances would be created for each shift operation.

Check List

dan-ziv commented 7 months ago

:tada: This PR is included in version 0.2.1-dev.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

dan-ziv commented 7 months ago

:tada: This PR is included in version 0.2.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: