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

core/[state|vm],trie: inspect and test getbalance costs for DNE addrs #2

Closed
meowsbits opened this issue Feb 19, 2020 · 1 comment
Closed
Labels

Comments

@meowsbits
Copy link
Member

Migrated from: https://api.github.com/repos/etclabscore/multi-geth-fork/issues/152
Original author: @meowsbits


Benchmarks for DNE (Do Not Exist) address BALANCE calls.

> go test -bench Benchmark.*GetBalance ./core/state/...
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/state
BenchmarkStateDB_GetBalance_Existing-12          2528650
490 ns/op
BenchmarkStateDB_GetBalance_DNE-12                252471
4267 ns/op
PASS
ok      github.com/ethereum/go-ethereum/core/state      10.503s

> go test -bench Benchmark.*BalanceDNE ./core/vm/...
PASS
ok      github.com/ethereum/go-ethereum/core/vm 0.155s
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/vm/runtime
BenchmarkEVM_BalanceDNE_Gas40-12                   42105
28429 ns/op
BenchmarkEVM_BalanceDNE_Gas400-12                  43124
28241 ns/op
BenchmarkEVM_BalanceDNE_Gas4000-12                 30919
39121 ns/op
BenchmarkEVM_BalanceDNE_Gas40000-12                 9037
155781 ns/op
BenchmarkEVM_BalanceDNE_Gas004Gwei-12                 10
127698023 ns/op
BenchmarkEVM_BalanceDNE_Gas04Gwei-12                   1
1098864244 ns/op
BenchmarkEVM_BalanceDNE_Gas4Gwei-12                    1
11883739376 ns/op
BenchmarkEVM_BalanceDNE_Gas40Gwei-12                   1
119108679718 ns/op
PASS
ok      github.com/ethereum/go-ethereum/core/vm/runtime 139.523s

Signed-off-by: meows b5c6@protonmail.com

@meowsbits
Copy link
Member Author

Closing since PR that will be reopened.

meowsbits referenced this issue in meowsbits/core-geth Feb 27, 2020
README.md:remove classic-geth column since it's obsoleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant