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

Bump to revm 3.0 #153

Open
gakonst opened this issue Feb 14, 2023 · 7 comments · May be fixed by #212
Open

Bump to revm 3.0 #153

gakonst opened this issue Feb 14, 2023 · 7 comments · May be fixed by #212
Assignees

Comments

@gakonst
Copy link

gakonst commented Feb 14, 2023

Dragan released a new Revm version with some perf improvements, https://crates.io/crates/revm

@gakonst
Copy link
Author

gakonst commented Apr 14, 2023

hi @ziyadedher wonder if you have some capacity for this? revm has gotten some improvements lately and would love to get an update in the table

@ziyadedher
Copy link
Owner

Thanks for the bump! Will do this today. I'm on the road and don't have my main computer, so I might just update all the results on my laptop. Either way, relative results should still be stable.

@ziyadedher ziyadedher self-assigned this Apr 14, 2023
@ziyadedher
Copy link
Owner

Benchmarks are running on my laptop now, couldn't get pypy to compile properly on my Mac (at least not for Python 3.9), so just gonna do without for now. Will post a PR once the benchmark results come through.

@ziyadedher ziyadedher linked a pull request Apr 15, 2023 that will close this issue
@ziyadedher
Copy link
Owner

ziyadedher commented Apr 15, 2023

I'm seeing some surprising results on my MacBook (maybe ignore ethereumjs since my node-js runner is probably very optimized for work):

evmone revm pyrevm geth py-evm.cpython ethereumjs
sum 69.2ms 100.4ms 218ms 231.4ms 21.7272s 31.3376s
relative 1.000x 1.451x 3.150x 3.344x 313.977x 452.855x
erc20.approval-transfer 7.4ms 10.2ms 21.8ms 17.4ms 1.374s 1.8832s
erc20.mint 5.2ms 6.2ms 16.8ms 18.4ms 1.2822s 2.8656s
erc20.transfer 8.6ms 12ms 24.4ms 26ms 1.8158s 3.3676s
snailtracer 45ms 67ms 143ms 157ms 15.455s 21.592s
ten-thousand-hashes 3ms 5ms 12ms 12.6ms 1.8002s 1.6292s

I want to re-run these benchmarks when I'm back at my computer as a sanity check, but digging a bit deeper I see this:

revm.old revm.new
sum 94.2ms 109.3ms
relative 1.000x 1.160x
erc20.approval-transfer 10.6ms 11.4ms
erc20.mint 6.2ms 7.4ms
erc20.transfer 11.4ms 13ms
snailtracer 61.6ms 72.5ms
ten-thousand-hashes 4.4ms 5ms

Where revm.old is using pre-#212 revm-interpreter and revm.new is using latest at 1.1.1.

In the meantime, @rakita do you have any thoughts on a potential regression here? I think I'm actually seeing a slight regression from the old "release" of revm-interpreter to the latest one (1.1.1). Is the way the runner is setup still optimal?

@gakonst does this surprise you given how you feel Foundry or Reth perf has been?

@gakonst
Copy link
Author

gakonst commented Apr 17, 2023

Thx we'll investigate!

@ziyadedher
Copy link
Owner

Sounds good! Please keep me in the loop, I definitely wanna make sure that this benchmark suite is not misleading.

@rakita
Copy link
Contributor

rakita commented Apr 17, 2023

This is expected, we removed one optimization (gas block) for more flexibility in lib usage, I got a little bit less performance degradation as a lot of jump predictions did they work, but i think this is run in docker so it is more effected.

I would say run it a few more times (2/3) just to confirm it is similar results and that would be it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants