Skip to content

Commit

Permalink
BigDec operation speedups (#8006)
Browse files Browse the repository at this point in the history
* Rename precisionReuse and use squaredPrecisionReuse properly

* Remove redundant copies for chop operations

* Speedup RoundUpMut failed, just committing benchmark

* CL notes

* Speedup Truncate routines by saving ~2 word sizes

* Add BigDec x Dec fns

* Minor approx root spedup

* Driveby, better mut usage in stableswap

* Add AbsMut

* Auto: update go.mod after push to dev/bigdec_speedups that modified dependencies locally

---------

Co-authored-by: github-actions <github-actions@github.com>
(cherry picked from commit b56059e)

# Conflicts:
#	go.mod
#	go.sum
#	osmomath/go.mod
#	osmomath/go.sum
#	osmoutils/go.mod
#	osmoutils/go.sum
#	x/epochs/go.mod
#	x/epochs/go.sum
#	x/ibc-hooks/go.mod
#	x/ibc-hooks/go.sum
  • Loading branch information
ValarDragon authored and mergify[bot] committed Apr 11, 2024
1 parent 85cf06b commit 301ac7b
Show file tree
Hide file tree
Showing 17 changed files with 289 additions and 54 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### State Compatible

* [#8006](https://github.com/osmosis-labs/osmosis/pull/8006) Speedup many BigDec operations

## v24.0.1

* [#7994](https://github.com/osmosis-labs/osmosis/pull/7994) Async pruning for IAVL v1
Expand Down
8 changes: 8 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ require (
github.com/mattn/go-sqlite3 v1.14.17
github.com/ory/dockertest/v3 v3.10.0
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3
<<<<<<< HEAD
github.com/osmosis-labs/osmosis/osmomath v0.0.10-0.20240409161506-a48ca4af185c
github.com/osmosis-labs/osmosis/osmoutils v0.0.10-0.20240409161506-a48ca4af185c
github.com/osmosis-labs/osmosis/x/epochs v0.0.6-0.20240409161506-a48ca4af185c
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.11-0.20240409161506-a48ca4af185c
github.com/osmosis-labs/sqs/sqsdomain v0.0.0-20240328223248-ae061110b150
=======
github.com/osmosis-labs/osmosis/osmomath v0.0.12-0.20240410095049-0ddea0b91fb3
github.com/osmosis-labs/osmosis/osmoutils v0.0.12-0.20240410095049-0ddea0b91fb3
github.com/osmosis-labs/osmosis/x/epochs v0.0.8-0.20240410095049-0ddea0b91fb3
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.14-0.20240410095049-0ddea0b91fb3
github.com/osmosis-labs/sqs/sqsdomain v0.0.0-20240404053421-41aab009fb04
>>>>>>> b56059e4 (BigDec operation speedups (#8006))
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.6.0
Expand Down
13 changes: 13 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,7 @@ github.com/osmosis-labs/cosmos-sdk v0.47.5-v23-osmo-9-iavl-v1 h1:cJfWAQHK2Em6cE5
github.com/osmosis-labs/cosmos-sdk v0.47.5-v23-osmo-9-iavl-v1/go.mod h1:O4R0cSw6y7aGLpDCd9epgX+1nsRQMpmexmI03j/sQYI=
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:YlmchqTmlwdWSmrRmXKR+PcU96ntOd8u10vTaTZdcNY=
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI=
<<<<<<< HEAD
github.com/osmosis-labs/ibc-go/v7 v7.3.3 h1:aSqu18eqAR9tMjIrqYSy5GezIBPvZbvOEyZeM/5VgEo=
github.com/osmosis-labs/ibc-go/v7 v7.3.3/go.mod h1:IMeOXb7gwpZ+/nOG5BuUkdW4weM1ezvN4PQPws4uzOI=
github.com/osmosis-labs/osmosis/osmomath v0.0.10-0.20240409161506-a48ca4af185c h1:9uBBhQT17o2fF+pKPWrSGAqG2aXjm4SR9fjMxuxuqbk=
Expand All @@ -1522,6 +1523,18 @@ github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.11-0.20240409161506-a48ca4af185
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.11-0.20240409161506-a48ca4af185c/go.mod h1:9C+lwGSUB+MpivIIu7iS2PoJK6aJZuaf+KXOX2fQ4Kg=
github.com/osmosis-labs/sqs/sqsdomain v0.0.0-20240328223248-ae061110b150 h1:z490JBjgVkvreJNeFE9es16rhc0rurM2GRhwqW0wEoY=
github.com/osmosis-labs/sqs/sqsdomain v0.0.0-20240328223248-ae061110b150/go.mod h1:H6XfDqE0PiUoIXaTTVipupfbrpz7Cu95jYbu2yYo6Tg=
=======
github.com/osmosis-labs/osmosis/osmomath v0.0.12-0.20240410095049-0ddea0b91fb3 h1:2FRCIC8gXSACn9SMmZivBXYdND/O/xrYK9rRzdY/fSY=
github.com/osmosis-labs/osmosis/osmomath v0.0.12-0.20240410095049-0ddea0b91fb3/go.mod h1:I1Nw0VK1JOaZH5f0AFl4iFB2Qp2ckbH9a3Z4UZLpDbs=
github.com/osmosis-labs/osmosis/osmoutils v0.0.12-0.20240410095049-0ddea0b91fb3 h1:dJFXQbBbMZ9UDtIMseoGlBg4fe5rSui7x3x9baAGw9w=
github.com/osmosis-labs/osmosis/osmoutils v0.0.12-0.20240410095049-0ddea0b91fb3/go.mod h1:fo3rKZIybC/tRMX09a0W/1UBl9meK1+T4PmWs1wErHI=
github.com/osmosis-labs/osmosis/x/epochs v0.0.8-0.20240410095049-0ddea0b91fb3 h1:UGxPvBFipIM8q3SJUYRjSP0+D/3Y8BkZGLvO+ov/fYs=
github.com/osmosis-labs/osmosis/x/epochs v0.0.8-0.20240410095049-0ddea0b91fb3/go.mod h1:N2+CB3wWEN/HmtWNK9DjAN1WGLgqeRiGjs+ZhK3RXdQ=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.14-0.20240410095049-0ddea0b91fb3 h1:QHtWt4M49bYH64Vy0DetURTtLGUIGWTpLOBIH9q/bhQ=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.14-0.20240410095049-0ddea0b91fb3/go.mod h1:C4/AaeluMrYxFehK61WGXVG7DvofFUyit7Xb0QKyQPA=
github.com/osmosis-labs/sqs/sqsdomain v0.0.0-20240404053421-41aab009fb04 h1:mvkk1A/jIe+lsFFpRNfyd9UfvhagATdpnjy8K7kANeo=
github.com/osmosis-labs/sqs/sqsdomain v0.0.0-20240404053421-41aab009fb04/go.mod h1:mYYf7pYb7sGJ9zYIOw2aYlIl5cgKT0K93rZx4LvDAuA=
>>>>>>> b56059e4 (BigDec operation speedups (#8006))
github.com/osmosis-labs/wasmd v0.45.0-osmo h1:NIp7pvJV5HuBN1HwPgEmXKQM2TjVIVdJErIHnB9IMO8=
github.com/osmosis-labs/wasmd v0.45.0-osmo/go.mod h1:J6eRvwii5T1WxhetZkBg1kOJS3GTn1Bw2OLyZBb8EVU=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
Expand Down
Loading

0 comments on commit 301ac7b

Please sign in to comment.