-
Notifications
You must be signed in to change notification settings - Fork 140
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
Optimize ByteSize functions for 7 Value types #1299
Conversation
Optimized ByteSize() for the following Value types: - IntValue - Int128Value - Int256Value - UIntValue - UInt128Value - UInt256Value - PathValue
Codecov Report
@@ Coverage Diff @@
## master #1299 +/- ##
=======================================
Coverage 77.17% 77.18%
=======================================
Files 279 279
Lines 35791 35796 +5
=======================================
+ Hits 27623 27628 +5
Misses 7081 7081
Partials 1087 1087
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Cadence Benchstat comparisonThis branch with compared with the base branch onflow:master commit b3c99f7 Results
|
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.
Looks good!
Would this require a storage migration?
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.
Very nice! Thank you for optimizing this 👍
@SupunS Great question! I should've mentioned it. No, it doesn't require migration, just optimization under the hood. |
Closes #1259
Description
ByteSize() of some types were obtained by encoding the values to CBOR and getting the resulting data size.
This optimization computes the data size without encoding.
Optimized ByteSize() for the following Value types:
Caveats
These were not optimized yet because it would increase code maintenance.
master
branchFiles changed
in the Github PR explorer