Closed shuhuiluo closed 3 months ago
Which issue does this pull request resolve?
Now that Solady bit math is imported, the original mostSignificantBit implementation expanded in TickMath.getTickAtSqrtPrice should be replaced by a call to BitMath.mostSignificantBit.
mostSignificantBit
TickMath.getTickAtSqrtPrice
BitMath.mostSignificantBit
Also refactor BitMath a bit for more performance.
BitMath
for our note - this is relevant to both Spearbit#7 and Spearbit#43
Related Issue
Which issue does this pull request resolve?
Description of changes
Now that Solady bit math is imported, the original
mostSignificantBit
implementation expanded inTickMath.getTickAtSqrtPrice
should be replaced by a call toBitMath.mostSignificantBit
.Also refactor
BitMath
a bit for more performance.