File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ Ref: https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.j
4343
4444* [ #18874 ] ( https://github.com/cosmos/cosmos-sdk/pull/18874 ) Speedup ` math.Int.Mul ` by removing a duplicate overflow check
4545* [ #19386 ] ( https://github.com/cosmos/cosmos-sdk/pull/19386 ) Speedup ` math.Int ` overflow checks
46+ * [ #19466 ] ( https://github.com/cosmos/cosmos-sdk/pull/19466 ) Speedup ` math.NewLegacyDec ` by one heap allocation
4647* [ #19467 ] ( https://github.com/cosmos/cosmos-sdk/pull/19467 ) Slightly speedup ` math.LegacyDec ` ` Ceil ` and ` MarshalTo ` methods
4748
4849### Bug Fixes
Original file line number Diff line number Diff line change @@ -102,8 +102,9 @@ func LegacyNewDec(i int64) LegacyDec {
102102// create a new Dec from integer with decimal place at prec
103103// CONTRACT: prec <= Precision
104104func LegacyNewDecWithPrec (i , prec int64 ) LegacyDec {
105+ bi := big .NewInt (i )
105106 return LegacyDec {
106- new (big. Int ). Mul (big . NewInt ( i ) , precisionMultiplier (prec )),
107+ bi . Mul (bi , precisionMultiplier (prec )),
107108 }
108109}
109110
You can’t perform that action at this time.
0 commit comments