Skip to content
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

Reduce WeakGc<T> memory usage #3492

Merged
merged 2 commits into from
Dec 4, 2023
Merged

Reduce WeakGc<T> memory usage #3492

merged 2 commits into from
Dec 4, 2023

Conversation

HalidOdat
Copy link
Member

Makes inner storage of WeakGc<T> store () in place of Ephemeron value, instead of a clone of the Gc<T>, which is already stored in the key.

Reducing the size by the width of one pointer.

Makes inner storage of `WeakGc<T>` store `()` in place of `Ephemeron` value,
insteadthe of a clone of the `Gc<T>` which is already stored in the key.

Reducing the size by the width of one pointer.
@HalidOdat HalidOdat added the memory PRs and Issues related to the memory management or memory footprint. label Dec 1, 2023
@HalidOdat HalidOdat requested a review from a team December 1, 2023 00:06
Copy link

github-actions bot commented Dec 1, 2023

Test262 conformance changes

Test result main count PR count difference
Total 95,609 95,609 0
Passed 76,526 76,526 0
Ignored 18,132 18,132 0
Failed 951 951 0
Panics 0 0 0
Conformance 80.04% 80.04% 0.00%

Copy link

codecov bot commented Dec 1, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (9f181ef) 44.57% compared to head (e7062b0) 44.57%.

Files Patch % Lines
boa_gc/src/pointers/weak.rs 50.00% 2 Missing ⚠️
boa_gc/src/pointers/gc.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3492   +/-   ##
=======================================
  Coverage   44.57%   44.57%           
=======================================
  Files         487      487           
  Lines       50621    50627    +6     
=======================================
+ Hits        22563    22569    +6     
  Misses      28058    28058           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HalidOdat HalidOdat requested review from jedel1043 and a team December 1, 2023 05:49
@HalidOdat HalidOdat added this to the v0.18.0 milestone Dec 3, 2023
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice optimization!

@jedel1043 jedel1043 requested a review from a team December 3, 2023 22:56
Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good find!

@raskad raskad added this pull request to the merge queue Dec 4, 2023
Merged via the queue into main with commit 13ba869 Dec 4, 2023
14 checks passed
@jedel1043 jedel1043 deleted the optimization/reduce-weakgc-size branch December 4, 2023 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
memory PRs and Issues related to the memory management or memory footprint.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants