go-ethereum/core/vm
Marius van der Wijden 16a6531ac2
core: miner: reduce allocations in block building (#33375)
I recently went on a longer flight and started profiling the geth block
production pipeline.
This PR contains a bunch of individual fixes split into separate
commits.
I can drop some if necessary.


Benchmarking is not super easy, the benchmark I wrote is a bit
non-deterministic.
I will try to write a better benchmark later
```
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/miner
cpu: Intel(R) Core(TM) Ultra 7 155U
                │ /tmp/old.txt │          /tmp/new.txt          │
                │    sec/op    │   sec/op     vs base           │
BuildPayload-14    141.5µ ± 3%   146.0µ ± 6%  ~ (p=0.346 n=200)

                │ /tmp/old.txt │             /tmp/new.txt             │
                │     B/op     │     B/op      vs base                │
BuildPayload-14   188.2Ki ± 4%   177.4Ki ± 4%  -5.71% (p=0.018 n=200)

                │ /tmp/old.txt │            /tmp/new.txt             │
                │  allocs/op   │  allocs/op   vs base                │
BuildPayload-14    2.703k ± 4%   2.453k ± 5%  -9.25% (p=0.000 n=200)
```
2026-02-03 08:19:16 +01:00
..
program all: fix problematic function name in comment (#32513) 2025-08-29 08:54:23 +08:00
runtime core: miner: reduce allocations in block building (#33375) 2026-02-03 08:19:16 +01:00
testdata core/vm: switch modexp gas computation to uint64 (#32527) 2025-09-08 13:33:10 +02:00
analysis_legacy.go core/vm: add configurable jumpdest analysis cache (#32143) 2025-08-01 13:57:38 +02:00
analysis_legacy_test.go core/vm: using testing.B.Loop (#32660) 2025-09-19 17:06:55 -06:00
common.go core/vm: refactor to use bitutil.TestBytes (#32434) 2025-08-15 15:10:44 +08:00
contract.go core/vm: add configurable jumpdest analysis cache (#32143) 2025-08-01 13:57:38 +02:00
contracts.go core/vm: avoid escape to heap (#33537) 2026-01-07 10:02:27 +08:00
contracts_fuzz_test.go eth/tracers: live chain tracing with hooks (#29189) 2024-03-22 18:53:53 +01:00
contracts_test.go core/vm: using testing.B.Loop (#32660) 2025-09-19 17:06:55 -06:00
doc.go core/vm: remove JIT VM codes (#16362) 2018-03-26 13:48:04 +03:00
eips.go core/vm: implement EIP-8024 (#33095) 2025-11-26 15:58:59 +01:00
errors.go build: update to golangci-lint 1.61.0 (#30587) 2024-10-14 19:25:22 +02:00
evm.go core: miner: reduce allocations in block building (#33375) 2026-02-03 08:19:16 +01:00
gas.go core/vm, cmd/evm: implement eof validation (#30418) 2024-10-02 15:05:50 +02:00
gas_table.go core/vm: check if read-only in gas handlers (#33281) 2026-01-15 15:55:43 -07:00
gas_table_test.go core/tracing: add code change reason (#32525) 2025-09-02 12:44:47 +02:00
instructions.go core: miner: reduce allocations in block building (#33375) 2026-02-03 08:19:16 +01:00
instructions_test.go core/vm: update EIP-8024 - Missing immediate byte is now treated as 0x00 (#33614) 2026-01-22 12:16:02 -07:00
interface.go core: invoke selfdestruct tracer hooks during finalisation (#32919) 2026-01-16 15:10:08 -07:00
interpreter.go core, miner, trie: add metrics tracking state trie depth (#32388) 2025-08-22 22:09:14 +08:00
interpreter_test.go core/vm: using testing.B.Loop (#32660) 2025-09-19 17:06:55 -06:00
jump_table.go core/vm: fold EVMInterpreter into EVM (#32352) 2025-08-08 00:01:41 +02:00
jump_table_export.go core/vm: implement EIP-7939 - CLZ opcode (#31989) 2025-07-07 11:19:33 +02:00
jump_table_test.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00
jumpdests.go core/vm: add configurable jumpdest analysis cache (#32143) 2025-08-01 13:57:38 +02:00
memory.go core/vm: improve memory resize (#33056) 2025-11-26 16:50:16 +01:00
memory_table.go core/vm, cmd/evm: remove EOF (#32000) 2025-06-11 14:50:46 +02:00
memory_test.go core/vm: improve memory resize (#33056) 2025-11-26 16:50:16 +01:00
opcodes.go core/vm: implement EIP-7939 - CLZ opcode (#31989) 2025-07-07 11:19:33 +02:00
operations_acl.go core/vm: add read only protection for opcodes (#33637) 2026-01-19 20:43:14 +08:00
operations_verkle.go core/state, core/vm: update stateless gas costs to follow the verkle-gen-7 testnet (#31014) 2025-05-15 20:43:52 +08:00
stack.go core/vm: improved stack swap performance (#30249) 2024-08-06 14:38:47 +02:00
stack_table.go core/vm: 64 bit memory and gas calculations (#19210) 2019-03-12 11:40:05 +02:00