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

Insertion benchmark #499

Draft
wants to merge 1 commit into
base: kaustinen-with-shapella
Choose a base branch
from
Draft

Conversation

gballet
Copy link
Owner

@gballet gballet commented Sep 17, 2024

This is a tracking issue. This benchmark is very similar to the one in go-verkle, but it adds the tree key computation and not just the root commitment.

This is still incomplete, because the tree isn't pre-seeded with data. It would ideally take a converted database, which I'm currently generating.

Seed: d68510e02916eaeb
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/trie
cpu: AMD Ryzen 9 5950X 16-Core Processor            
BenchmarkBatchLeavesInsert
BenchmarkBatchLeavesInsert-32    	       4	 253212641 ns/op	34992560 B/op	   84816 allocs/op
PASS
ok  	github.com/ethereum/go-ethereum/trie	2.524s

This is a pretty beefy machine, and the total insertion + root computation is ~250ms for a "conversion stage" payload.

This is running inside a VM on a Snapdragon 8cx Gen3 8 core processor:

Seed: a609951c16082e50
goos: linux
goarch: arm64
pkg: github.com/ethereum/go-ethereum/trie
BenchmarkBatchLeavesInsert-8           2         507675503 ns/op        26826944 B/op      66729 allocs/op
PASS
ok      github.com/ethereum/go-ethereum/trie    2.257s

The same payload takes double the time, 500ms.

Signed-off-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
@gballet gballet changed the title add insertion benchmark Insertion benchmark Sep 18, 2024
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.

1 participant