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

Tracking issue: flatten the eval stack #183

Open
sorpaas opened this issue Oct 29, 2023 · 0 comments
Open

Tracking issue: flatten the eval stack #183

sorpaas opened this issue Oct 29, 2023 · 0 comments

Comments

@sorpaas
Copy link
Member

sorpaas commented Oct 29, 2023

Currently, if core finds an opcode it cannot handle, it will Trap first, and then Runtime will attempt to eval it. This is rather inefficient.

Instead, core should expose the eval table (which is just 256-item fn pointers), to allow Runtime to customize it. Machine would now take a generic parameter stateS (with default ()), and then pass it as the final parameter to eval fns. Runtime then should fully build with that, and only trap for CALL/CREATE. Gasometer should be the only thing that wraps a Machine.

This should make it more predictable when reasoning about performance, while not losing much abstractions.

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

No branches or pull requests

1 participant