forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: optimize math.Int.Size for small values
This is a simpler version of cosmos#16263 that only optimizes values that fit in 53 bits. It is possible to optimize values that fit in 64 bits by using big.Int.BitLen and math.Log2(10), but it doesn't seem worth the complexity, especially given the revert of cosmos#16263. I failed to beat big.Int.Marshal for values that don't fit in 64 bits.
- Loading branch information
1 parent
393dcc1
commit 5ef4cea
Showing
4 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters