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/vm: avoid memory expansion check for trivial ops (#24048) #652

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

minh-bq
Copy link
Contributor

@minh-bq minh-bq commented Dec 25, 2024

commit ethereum/go-ethereum@155795b.

This moves the memorySize and memory resize into dynamicGas branch based on the assumption that an opcode that have memorySize function will have dynamicGas function.

goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/vm
cpu: AMD EPYC 7763 64-Core Processor
                          │   old.txt    │              new.txt               │
                          │    sec/op    │   sec/op     vs base               │
EvmInsertionSort-4          77.40m ± 13%   74.33m ± 5%  -3.97% (p=0.007 n=10)
EvmQuickSort-4              4.952m ±  1%   4.766m ± 1%  -3.76% (p=0.000 n=10)
EvmSignatureValidation-4    11.36µ ±  3%   11.04µ ± 1%  -2.78% (p=0.000 n=10)
EvmMulticallErcTransfer-4   4.625m ±  1%   4.529m ± 2%  -2.07% (p=0.003 n=10)
EvmRedBlackTree-4           223.8m ±  2%   215.3m ± 3%  -3.82% (p=0.001 n=10)
geomean                     5.380m         5.203m       -3.28%

commit ethereum/go-ethereum@155795b.

This moves the memorySize and memory resize into dynamicGas branch based on the
assumption that an opcode that have memorySize function will have dynamicGas
function.

goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/core/vm
cpu: AMD EPYC 7763 64-Core Processor
                          │   old.txt    │              new.txt               │
                          │    sec/op    │   sec/op     vs base               │
EvmInsertionSort-4          77.40m ± 13%   74.33m ± 5%  -3.97% (p=0.007 n=10)
EvmQuickSort-4              4.952m ±  1%   4.766m ± 1%  -3.76% (p=0.000 n=10)
EvmSignatureValidation-4    11.36µ ±  3%   11.04µ ± 1%  -2.78% (p=0.000 n=10)
EvmMulticallErcTransfer-4   4.625m ±  1%   4.529m ± 2%  -2.07% (p=0.003 n=10)
EvmRedBlackTree-4           223.8m ±  2%   215.3m ± 3%  -3.82% (p=0.001 n=10)
geomean                     5.380m         5.203m       -3.28%
@minh-bq minh-bq force-pushed the interpreter-memory-resize branch from d6a616f to a2e6aac Compare December 25, 2024 06:26
Copy link
Contributor

@chiphamskymavis chiphamskymavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants