Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: subUnlockedCoins is not optimal #865

Closed

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Oct 23, 2024

Description

a little bit faster:

goos: darwin
goarch: arm64
pkg: github.com/crypto-org-chain/cronos/v2/app
                                │ /tmp/before │            /tmp/after             │
                                │   sec/op    │   sec/op     vs base              │
ERC20Transfer/memdb-16            639.7m ± 2%   646.6m ± 1%  +1.07% (p=0.009 n=6)
ERC20Transfer/leveldb-16          638.7m ± 1%   644.8m ± 0%  +0.96% (p=0.015 n=6)
ERC20Transfer/memiavl-16          643.2m ± 1%   648.9m ± 1%  +0.89% (p=0.015 n=6)
ERC20Transfer/memiavl-stm-1-16    761.4m ± 1%   768.2m ± 1%       ~ (p=0.132 n=6)
ERC20Transfer/memiavl-stm-8-16    148.7m ± 1%   148.3m ± 0%       ~ (p=0.240 n=6)
ERC20Transfer/memiavl-stm-16-16   127.6m ± 0%   126.4m ± 1%  -0.94% (p=0.009 n=6)
ERC20Transfer/memiavl-stm-32-16   141.2m ± 4%   139.6m ± 2%  -1.15% (p=0.026 n=6)
geomean                           341.0m        341.6m       +0.20%

                                │ /tmp/before  │             /tmp/after             │
                                │     B/op     │     B/op      vs base              │
ERC20Transfer/memdb-16            376.7Mi ± 0%   373.7Mi ± 0%  -0.80% (p=0.002 n=6)
ERC20Transfer/leveldb-16          379.1Mi ± 0%   376.1Mi ± 0%  -0.79% (p=0.002 n=6)
ERC20Transfer/memiavl-16          373.0Mi ± 0%   370.0Mi ± 0%  -0.81% (p=0.002 n=6)
ERC20Transfer/memiavl-stm-1-16    478.8Mi ± 0%   475.8Mi ± 0%  -0.63% (p=0.002 n=6)
ERC20Transfer/memiavl-stm-8-16    483.5Mi ± 0%   480.5Mi ± 0%  -0.60% (p=0.002 n=6)
ERC20Transfer/memiavl-stm-16-16   492.9Mi ± 0%   489.8Mi ± 0%  -0.64% (p=0.002 n=6)
ERC20Transfer/memiavl-stm-32-16   510.1Mi ± 0%   508.2Mi ± 0%  -0.38% (p=0.009 n=6)
geomean                           438.2Mi        435.3Mi       -0.66%

                                │ /tmp/before │            /tmp/after             │
                                │  allocs/op  │  allocs/op   vs base              │
ERC20Transfer/memdb-16            4.808M ± 0%   4.713M ± 0%  -1.98% (p=0.002 n=6)
ERC20Transfer/leveldb-16          4.806M ± 0%   4.711M ± 0%  -1.98% (p=0.002 n=6)
ERC20Transfer/memiavl-16          4.744M ± 0%   4.649M ± 0%  -2.00% (p=0.002 n=6)
ERC20Transfer/memiavl-stm-1-16    6.062M ± 0%   5.967M ± 0%  -1.57% (p=0.002 n=6)
ERC20Transfer/memiavl-stm-8-16    6.117M ± 0%   6.023M ± 0%  -1.53% (p=0.002 n=6)
ERC20Transfer/memiavl-stm-16-16   6.232M ± 0%   6.135M ± 0%  -1.55% (p=0.002 n=6)
ERC20Transfer/memiavl-stm-32-16   6.437M ± 0%   6.355M ± 0%  -1.28% (p=0.002 n=6)
geomean                           5.554M        5.460M       -1.70%

Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

CHANGELOG.md Outdated Show resolved Hide resolved
@yihuang yihuang marked this pull request as draft October 23, 2024 04:30
Comment on lines +1193 to +1197
for _, store := range rs.stores {
if closer, ok := store.(io.Closer); ok {
errs = append(errs, closer.Close())
}
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant