Skip to content
This repository has been archived by the owner on Feb 18, 2025. It is now read-only.

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

Closed

Conversation

minh-bq
Copy link
Collaborator

@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!

@chiphamskymavis chiphamskymavis added this to the v2.9.1 milestone Jan 24, 2025
@minh-bq minh-bq closed this by deleting the head repository Feb 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants