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

Add & use FinalizedCheckpointEpoch() to state #4766

Merged
merged 2 commits into from Feb 6, 2020

Conversation

prestonvanloon
Copy link
Member

There were many instances where we were doing state.FInalizedCheckpoint().Epoch which makes a full copy of the checkpoint unnecessarily. Looking at this benchmark, it seems to improve epoch processing by about 30%.

Before

BenchmarkProcessEpoch_2FullEpochs-8           39          34897535 ns/op        23557595 B/op     389336 allocs/op

After

BenchmarkProcessEpoch_2FullEpochs-8           54          25043262 ns/op        18837890 B/op     291021 allocs/op

@prestonvanloon prestonvanloon added Enhancement New feature or request Ready For Review A pull request ready for code review labels Feb 6, 2020
@codecov
Copy link

codecov bot commented Feb 6, 2020

Codecov Report

Merging #4766 into master will increase coverage by 0.85%.
The diff coverage is 66.66%.

@@            Coverage Diff            @@
##           master   #4766      +/-   ##
=========================================
+ Coverage   55.64%   56.5%   +0.85%     
=========================================
  Files         249     248       -1     
  Lines       18725   18513     -212     
=========================================
+ Hits        10420   10460      +40     
+ Misses       6758    6499     -259     
- Partials     1547    1554       +7

@prylabs-bulldozer prylabs-bulldozer bot merged commit 27e7be6 into master Feb 6, 2020
@delete-merged-branch delete-merged-branch bot deleted the improve-epoch-processing branch February 6, 2020 03:26
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 24, 2020
* Add and use FinalizedCheckpointEpoch() to state
* comment
cryptomental pushed a commit to cryptomental/prysm that referenced this pull request Feb 28, 2020
* Add and use FinalizedCheckpointEpoch() to state
* comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants