Compute packed leaf values on demand (Option 1)#19
Compute packed leaf values on demand (Option 1)#19
Conversation
Co-authored-by: Mac Ladson <mjladson@pm.me>
Use unsafe to great effect
michaelsproul
left a comment
There was a problem hiding this comment.
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
hashfield and computes thevaluesfield on demand.Currently a WIP awaiting comparisons to keeping just the
valuesfield and computinghashon demand.