-
Notifications
You must be signed in to change notification settings - Fork 79
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
Switch execution to evmone baseline interpreter #619
Conversation
Codecov Report
@@ Coverage Diff @@
## master #619 +/- ##
==========================================
- Coverage 81.82% 81.78% -0.05%
==========================================
Files 170 169 -1
Lines 14196 14206 +10
==========================================
+ Hits 11616 11618 +2
- Misses 2580 2588 +8
Continue to review full report at Codecov.
|
@@ -84,7 +84,8 @@ StageResult Execution::forward(db::RWTxn& txn) { | |||
prune_receipts = std::min(prune_receipts, hashstate_stage_progress - 1); | |||
} | |||
|
|||
AnalysisCache analysis_cache; | |||
static constexpr size_t kCacheSize{5'000}; | |||
lru_cache<evmc::bytes32, std::shared_ptr<evmone::baseline::CodeAnalysis>> analysis_cache{kCacheSize}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get this. Isn't lru_cache<evmc::bytes32, std::shared_ptr<evmone::baseline::CodeAnalysis>>
the cache_
member of AdvancedAnalysisCache
class ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, in AdvancedAnalysisCache
it's lru_cache<evmc::bytes32, std::shared_ptr<evmone::
advanced::AdvancedCodeAnalysis>>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll introduce a type alias for clarity.
Switching execution from advanced to baseline evmone interpreter results in performance saving of about 1h (out of circa 1day) of the execution time. One contributing factor, I think, is that baseline
CodeAnalysis
is more compact thanAdavancedCodeAnalysis
, so the cache is significantly smaller and thus more RAM is available for MDBX page caching by the OS.linux-x86_64, gcc 11.2.0