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

cache bitmap and change the cache type of GetCode #449

Merged
merged 3 commits into from
Oct 15, 2021
Merged

Conversation

kyrie-yl
Copy link
Contributor

@kyrie-yl kyrie-yl commented Oct 13, 2021

Description

  • cache bitmap of contract code
  • change the cache type of GetCode from fastcache to lrucache.

Rationale

To reduce transaction execution time within the block.

Example

add an example CLI or API response...

Changes

Notable changes:

  • add each change in a bullet point here
  • ...

Preflight checks

  • build passed (make build)
  • tests passed (make test)
  • manual transaction test passed

Already reviewed by

...

Related issues

... reference related issue #'s here ...

"github.com/ethereum/go-ethereum/common"
"github.com/holiman/uint256"
)

const codeBitmapCacheSize = 2000
Copy link
Collaborator

Choose a reason for hiding this comment

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

How do you get 2000 here?

@unclezoro
Copy link
Collaborator

please better describe this PR: include title, description, the performance comparation.

@kyrie-yl kyrie-yl changed the base branch from master to develop October 13, 2021 11:27
kyrie-yl and others added 3 commits October 13, 2021 19:28
Signed-off-by: kyrie-yl <yl.on.the.way@gmail.com>
Signed-off-by: kyrie-yl <yl.on.the.way@gmail.com>
* core/vm: rework jumpdest analysis benchmarks

For BenchmarkJumpdestOpAnalysis use fixed code size of ~1.2MB
and classic benchmark loop.

* core/vm: clear bitvec in jumpdest analysis benchmark
@kyrie-yl kyrie-yl changed the title Opt kyrie cache bitmap and change the cache type of GetCode Oct 13, 2021
@unclezoro unclezoro merged commit 33aa779 into develop Oct 15, 2021
This was referenced Oct 19, 2021
@unclezoro unclezoro deleted the opt_kyrie branch December 5, 2021 09:43
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.

4 participants