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

EVM: Simple One-Item Peek Cache Experiment #3040

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

holgerd77
Copy link
Member

This is a quick experiement with a very simple one-item peek cache - following up a bit on the work on the hybrid stack from #3029 - to see if this somewhat mitigates our cleaner but a bit heavier double access stack structure through the separation of gas calculation (gas.ts) and opcode execution (functions.ts).

Results are not so clear, might bring a performance gain, might not.

This would need some profiler additions I guess to be more on the save side (will talk through with @jochem-brouwer).

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #3040 (7d1225b) into master (bd70544) will increase coverage by 0.03%.
The diff coverage is 88.63%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 88.73% <ø> (ø)
blockchain 92.58% <ø> (ø)
client 87.57% <ø> (+0.04%) ⬆️
common 98.18% <ø> (ø)
ethash ∅ <ø> (∅)
evm 71.80% <88.63%> (+0.10%) ⬆️
statemanager 89.91% <ø> (ø)
trie 90.84% <ø> (+0.23%) ⬆️
tx 96.35% <ø> (ø)
util 86.78% <ø> (ø)
vm 80.42% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@@ -1,5 +1,10 @@
import { ERROR, EvmError } from './exceptions.js'

type PeekCache = {
num: number
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This num should be the same as peekArray.length - right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, maybe both wrongly named and not necessary on second thought. 😂

@jochem-brouwer
Copy link
Member

Interesting, randomStatetest437 in state tests fails? 🤔 (and similar in blockchain tests?)

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

Successfully merging this pull request may close these issues.

None yet

2 participants