-
Notifications
You must be signed in to change notification settings - Fork 300
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
refactor: remove double-allocation for enum CST decode #1500
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1500 +/- ##
==========================================
- Coverage 99.20% 99.19% -0.01%
==========================================
Files 341 341
Lines 13141 13098 -43
==========================================
- Hits 13036 12993 -43
Misses 105 105 ☔ View full report in Codecov by Sentry. |
2c7c862
to
e51110c
Compare
...n/src/library/codegen/generator/wire/rust/spec_generator/codec/cst/decoder/ty/enumeration.rs
Outdated
Show resolved
Hide resolved
Great optimization! Just two nits (discussions). |
af8af19
to
1f48422
Compare
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.
LGTM! Just one nit about ManuallyDrop
1f48422
to
706e04e
Compare
(I will review after a sleep, roughly 8 hours later - with a brief look this LGTM and ready to merge :) ) |
Changes
(CST) Remove
*mut Enum_Variant
and inflate functions in favor ofMaybeUninit
. This reduces 1-2 allocations per enum instantiation and should reduce binary size somewhat.Checklist
./frb_internal precommit --mode slow
(orfast
) is run (it internal runs code generator, does auto formatting, etc)../website
folder) are updated.Remark for PR creator
./frb_internal --help
shows utilities for development.