Skip to content

core/vm: avoid memory expansion check for trivial ops (#24048)#7

Open
minh-bq wants to merge 1 commit intoronin-chain:masterfrom
minh-bq:interpreter-memory-resize
Open

core/vm: avoid memory expansion check for trivial ops (#24048)#7
minh-bq wants to merge 1 commit intoronin-chain:masterfrom
minh-bq:interpreter-memory-resize

Conversation

@minh-bq
Copy link
Contributor

@minh-bq minh-bq commented Feb 18, 2025

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%
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