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

Precompute OR flags #2341

Merged
merged 2 commits into from
Apr 9, 2021
Merged

Precompute OR flags #2341

merged 2 commits into from
Apr 9, 2021

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Apr 8, 2021

Motivation

Reduce unnecessary opts in hot paths

Description

Pre-computes the OR of flags to not do that on every loop of getAttestationDeltas().

  • With my local estimates this PR reduces the total time of getAttestationDeltas() by 16%
  • In Prater that means about 150ms per epoch transition

@codeclimate
Copy link

codeclimate bot commented Apr 8, 2021

Code Climate has analyzed commit d94c525 and detected 0 issues on this pull request.

View more on Code Climate.

@dapplion
Copy link
Contributor Author

dapplion commented Apr 8, 2021

Screenshot from 2021-04-08 21-41-08

@twoeths
Copy link
Contributor

twoeths commented Apr 9, 2021

this could be coordinate with #2348 . Could you give it a try @dapplion ?

@dapplion
Copy link
Contributor Author

dapplion commented Apr 9, 2021

this could be coordinate with #2348 . Could you give it a try @dapplion ?

Let's merge both

twoeths
twoeths previously approved these changes Apr 9, 2021
@wemeetagain
Copy link
Member

Can we hold off on this and #2348 until after we add the participation cache?

@wemeetagain
Copy link
Member

Actually, lets just merge #2348 first, then this (with this PR rebased to take advantage of #2348). And I'll base the participation cache off that.

@wemeetagain wemeetagain merged commit d590f65 into master Apr 9, 2021
@wemeetagain wemeetagain deleted the dapplion/or-flags branch April 9, 2021 19:31
@dapplion dapplion mentioned this pull request Apr 19, 2021
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.

None yet

3 participants