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

perf(interpreter): evaluate instruction table constructor at compile time #1140

Merged
merged 1 commit into from Mar 2, 2024

Conversation

DaniPopes
Copy link
Collaborator

Ideally this would also return &'static but since InstructionTable is generic over H, &'static InstructionTable<H> requires H: 'static, for which I haven't yet found a work-around.

…time

Ideally this would also return `&'static` but since `InstructionTable` is
generic over `H`, `&'static InstructionTable<H>` requires `H: 'static`, for
which I haven't yet found a work-around.
Copy link
Collaborator

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

what's the perf change before/after?

}
tables
};
}
Copy link
Member

Choose a reason for hiding this comment

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

Didn't know this was possible. Nice one!

llvm got fixed in 1.75 so we could use newest rust.
But will merge this as it is.

@rakita rakita merged commit 40216e7 into bluealloy:main Mar 2, 2024
25 checks passed
@github-actions github-actions bot mentioned this pull request Mar 2, 2024
@DaniPopes DaniPopes deleted the const-instruction-table branch March 2, 2024 07:54
fubuloubu pushed a commit to ApeWorX/revm that referenced this pull request Apr 11, 2024
…time (bluealloy#1140)

Ideally this would also return `&'static` but since `InstructionTable` is
generic over `H`, `&'static InstructionTable<H>` requires `H: 'static`, for
which I haven't yet found a work-around.
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.

None yet

3 participants