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

Feat: add optimizations for U256 constant calculations and Backend operations #48

Merged
merged 2 commits into from
Jul 2, 2024

Conversation

mrLSD
Copy link
Member

@mrLSD mrLSD commented Jun 21, 2024

Description

Added optimizations:
➡️ constants for U256: U64_MAX, USIZE_MAX

MemoryStack optimizations

If was added cache for Backend operations.
➡️ added cache for operations with Backend trait for MemoryStack

But as result of testings for aurora-engine gas cost insignificantly increased (about 0.5%) for 1 tests. And it was not gas decreased. So it was finally removed.

@mrLSD mrLSD self-assigned this Jun 21, 2024
@mrLSD mrLSD added the enhancement New feature or request label Jun 21, 2024
@mrLSD mrLSD marked this pull request as ready for review June 28, 2024 10:40
@mrLSD mrLSD requested review from aleksuss and birchmd June 28, 2024 10:55
Copy link
Member

@birchmd birchmd left a comment

Choose a reason for hiding this comment

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

Nice find! This is good low-hanging fruit.

@mrLSD mrLSD added this to the v0.43.1 milestone Jun 28, 2024
@mrLSD mrLSD merged commit a201e15 into master Jul 2, 2024
4 checks passed
@mrLSD mrLSD deleted the feat/read-storage-optimization branch July 2, 2024 19:13
github-merge-queue bot pushed a commit to aurora-is-near/aurora-engine that referenced this pull request Aug 14, 2024
## Description

Based on `SputnikVM` EVM optimizations: aurora-is-near/sputnikvm/pull/48

### Gas cost

➡️  A lot of tests show gas decreased to: `1-2%`
➡️ For some tests gas cost increased, it'is related to:
aurora-is-near/sputnikvm/pull/46 as it's requires additional NEAR
storage read operation.
aleksuss pushed a commit to aurora-is-near/aurora-engine that referenced this pull request Oct 10, 2024
## Description

Based on `SputnikVM` EVM optimizations: aurora-is-near/sputnikvm/pull/48

### Gas cost

➡️  A lot of tests show gas decreased to: `1-2%`
➡️ For some tests gas cost increased, it'is related to:
aurora-is-near/sputnikvm/pull/46 as it's requires additional NEAR
storage read operation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants