-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
use with_capacity to reduce re-allocations fixes #3896 #3961
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3961 +/- ##
==========================================
+ Coverage 47.24% 52.88% +5.64%
==========================================
Files 476 483 +7
Lines 46892 46855 -37
==========================================
+ Hits 22154 24780 +2626
+ Misses 24738 22075 -2663 ☔ View full report in Codecov by Sentry. |
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.
I'd be for merging this. I ran the benchmarks locally and there are no significant changes overall.
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.
Besides the comment, this looks good to me! :)
a70f9ae
to
1882c65
Compare
This PR attempts to address #3896
We already raised the threshold, but it would be good to not re-allocate the hashmaps and vectors as we will up the property storage during startup.
It doesn't seem to have much noticeable affect in the performance profiler but DHAT shows less
grow_one
calls fromboa_engine::object::shape::property_table::PropertyTableInner::insert (object/shape/property_table.rs:70:9)
, there are still some, we may be able to find these by checking.len() == .capacity()
and tracing back where these are coming from