3 releases
new 0.1.3 | Nov 15, 2024 |
---|---|
0.1.1 | Nov 6, 2024 |
0.1.0 | Oct 21, 2024 |
#560 in Magic Beans
386 downloads per month
Used in solana-secp256k1
10KB
125 lines
Solana NoStd BigModExp
A more efficient implementation of Big Number Modular Exponentiation for SVM.
Installation
cargo add solana-nostd-big-mod-exp
Features
- Makes use of MaybeUninit to skip zero allocations
- Implements a fixed size
big_mod_exp_fixed
function to avoid heap allocations
Performance
library | function | CU cost |
---|---|---|
nostd-big-mod-exp | big_mod_exp_fixed | 2102 |
nostd-big-mod-exp | big_mod_exp | 2122 |
solana-program | big_mod_exp | 2151 |
Dependencies
~1.5MB
~28K SLoC