#svm #solana #exp #big #fixed #no-std #mod

solana-nostd-big-mod-exp

A more efficient implementation of Big Mod Exp for SVM

1 unstable release

new 0.1.0 Oct 21, 2024

#386 in Magic Beans

Download history 79/week @ 2024-10-15

80 downloads per month

MIT license

9KB
124 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