Skip to content

Commit

Permalink
dev: optimized bitshifts by using a lookup table for powers of two
Browse files Browse the repository at this point in the history
  • Loading branch information
augustin-v authored and enitrat committed Oct 1, 2024
1 parent 7c08229 commit 31b3096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/utils/src/math.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use core::integer::{u512};
use core::num::traits::{Zero, One, BitSize, OverflowingAdd, OverflowingMul, Bounded};
use core::panic_with_felt252;
use core::traits::{BitAnd};
use utils::constants::POW_2_256;

// === Exponentiation ===

Expand Down Expand Up @@ -315,7 +316,6 @@ pub impl WrappingBitshiftImpl<
+WrappingExponentiation<T>,
+BitSize<T>,
+Bounded<T>,
+Into<T, u256>,
+TryInto<usize, T>,
+TryInto<T, usize>,
+TryInto<u256, T>,
Expand Down

0 comments on commit 31b3096

Please sign in to comment.