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

Small sputnik wins #448

Open
8 tasks
matklad opened this issue Feb 16, 2022 · 0 comments
Open
8 tasks

Small sputnik wins #448

matklad opened this issue Feb 16, 2022 · 0 comments

Comments

@matklad
Copy link
Contributor

matklad commented Feb 16, 2022

I think I've seen a handful 1-5% optimizations for sputnic. In isolation, they don't seem to make a lot of sense, but together they should add up. This issue collects the list of things I've tried and found beneficial or which think would be benefitial

These things were measured to be ~1% improvements:

  • returning an &H256 from peek, to avoid copy
  • refactoring record_dynamic_cost to not contain ? (the whole business of storing Result as a field and checking it on every access feels suspect)
  • storing code in Bytes rather than Rc<Vec<u8>> to avoid extra indirection during opcode fetch
  • use ArrayVec<U256, 1024> rather than Vec<U256> for the stack

These are theoretical wins

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