-
Notifications
You must be signed in to change notification settings - Fork 9
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
Compute packed leaf values on demand (Option 1) #19
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Mac Ladson <mjladson@pm.me>
Use unsafe to great effect
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.
Looking good and getting close to ready I think. I just found one more small optimisation related to the removal of the hash
from PackedLeaf::update
.
I did some CPU benchmarking of this branch vs The results are a bit frustrating. Slot processing and block processing are both around 1% faster with this branch, but tree hashing seems to be a bit slower (~10%). Full data here: https://docs.google.com/spreadsheets/d/1IbgU8wvLeC1XzDb3tQU-QQM0htHlyjoYlbVnG-kH8Dw/edit?usp=sharing. The Lighthouse commit used was sigp/lighthouse@bba1526. The command used was
The benchmarking command used was:
The log files were then parsed using I had a go at making some more optimisations in this commit, which is -- If we can demonstrate a clear memory benefit I think we should still go ahead with this change. That might just be a bit trickier to establish. It really seems like this branch should be better. |
Addresses #10
Keeps the
hash
field and computes thevalues
field on demand.Currently a WIP awaiting comparisons to keeping just the
values
field and computinghash
on demand.