Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/bogota #4122 +/- ##
=============================================
Coverage 95.37% 95.37%
=============================================
Files 677 677
Lines 41907 41907
Branches 3939 3939
=============================================
Hits 39969 39969
Misses 1359 1359
Partials 579 579
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bt-recneps
approved these changes
Dec 3, 2026
bt-recneps
left a comment
Contributor
There was a problem hiding this comment.
Traced MCOPY(2, 1, n) through the filled loop contract, base and head fixtures differ only in mcopy.json, nothing definite to flag :)
Reviewed in 14m 48s
Every test_mcopy case copied a range onto itself: MCOPY(x, x, n) with x = 0 or GAS % 7. Copy to one byte above the source instead, so the ranges overlap and both are unaligned. Drop the mem_size parameter, which only expands memory once, the GAS % 7 offsets, and the 256-byte copy, which is never the worst case. The MCOPY cases go from 48 to 3 per fork, all repricing (was 24).
chfast
force-pushed
the
benchmarks/mcopy-src-dst
branch
from
December 4, 2026 08:51
846cc73 to
5628156
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Every
test_mcopycase copied a range onto itself:MCOPY(x, x, n)with x = 0 (fixed_src_dst, repricing) orGAS % 7. Copy to one byte above the source instead (MCOPY(2, 1, n)), so the ranges overlap and both are unaligned.Also drop the
mem_sizeparameter, which only expands memory once (larger memory did not make the copy slower in geth, evmone or revm), theGAS % 7offsets, and the 256-byte copy. The MCOPY cases go from 48 to 3 per fork; all 3 are repricing (was 24).The kept sizes: 0 copies nothing, so it measures the base cost alone; 32 is the largest copy at the one-word price; 1024 checks the per-word cost on a long copy. The longer the copy, the more gas per second it runs, so 256 was never the worst case.
MGas/s, old
fixed_src_dst_True-mem_size_0→ new, Osaka (AMD 5950X; wall clock of a 500M gas block minus a 1M gas block, best of 3; Nethermind with 5000M; Besu by its own block timer, local build):Other layouts (disjoint, overlapping by 1 byte, destination below the source, other relative alignments) were within about 10% of this one at 1024 bytes in each client. At 32 and 256 bytes overlapping ranges were about 15–25% slower than disjoint ones in Nethermind.
Related Issues or PRs
ethpandaops/gas-lighting-tracker#90
Checklist
just static<type>(<area>): <description>, where<type>and<area>come from an appropriateC-<type>, respectivelyA-<area>, label. The title should match the target squash commit message.Cute Animal Picture