forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 2
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 BDWGC's buffered finalisation #117
Merged
ltratt
merged 2 commits into
softdevteam:master
from
jacob-hughes:use_buffered_finalization
Apr 18, 2024
Merged
Use BDWGC's buffered finalisation #117
ltratt
merged 2 commits into
softdevteam:master
from
jacob-hughes:use_buffered_finalization
Apr 18, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixed here: 73ecbeb (No need to squash) |
This one is an issue with yksom. I'm looking into a fix for this now. |
Fixed here: 1a8fe88 |
Please squash. |
1a8fe88
to
15b6f88
Compare
Squashed |
That'll teach me from re-typing a one line fix from bencher16 rather than applying the patch commit: b7566a0 |
Please squash. |
This commit switches the new buffered finalisation mechanism in BDWGC using the disclaim API. Gc<T> objects which need finalising are allocated with a 'disclaim' (i.e. finaliser) function pointer in their first word. These finalisers are added to buffers during GC which are then finalised on a separate thread from within the BDWGC. The table below shows the performance difference between this approach (called disclaim) and the previous tip-of-tree commit (which used the much slower, channel-based off-thread finalisation). ``` Benchmark Config Type mean (ms) Bounce baseline micro 874 Bounce disclaim micro 114 BubbleSort baseline micro 1273 BubbleSort disclaim micro 144 DeltaBlue baseline macro 552 DeltaBlue disclaim macro 91 Dispatch baseline micro 726 Dispatch disclaim micro 120 Fannkuch baseline micro 364 Fannkuch disclaim micro 66 Fibonacci baseline micro 1559 Fibonacci disclaim micro 200 FieldLoop baseline micro 835 FieldLoop disclaim micro 179 GraphSearch baseline macro 175 GraphSearch disclaim macro 43 IntegerLoop baseline micro 1685 IntegerLoop disclaim micro 181 JsonSmall baseline macro 542 JsonSmall disclaim macro 125 List baseline micro 1447 List disclaim micro 149 Loop baseline micro 2099 Loop disclaim micro 231 Mandelbrot baseline micro 1172 Mandelbrot disclaim micro 160 NBody baseline macro 722 NBody disclaim macro 69 PageRank baseline macro 662 PageRank disclaim macro 150 Permute baseline micro 1281 Permute disclaim micro 156 Queens baseline micro 1017 Queens disclaim micro 131 QuickSort baseline micro 251 QuickSort disclaim micro 41 Recurse baseline micro 1313 Recurse disclaim micro 183 Richards baseline macro Failed Richards disclaim macro 1722 Sieve baseline micro 1068 Sieve disclaim micro 215 Storage baseline micro 79 Storage disclaim micro 43 Sum baseline micro 864 Sum disclaim micro 105 Towers baseline micro 1309 Towers disclaim micro 153 TreeSort baseline micro 350 TreeSort disclaim micro 66 WhileLoop baseline micro 1962 WhileLoop disclaim micro 262 ```
b7566a0
to
b40e488
Compare
Squashed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit switches the new buffered finalisation mechanism in BDWGC using the disclaim API. Gc objects which need finalising are allocated with a 'disclaim' (i.e. finaliser) function pointer in their first word.
These finalisers are added to buffers during GC which are then finalised on a separate thread from within the BDWGC. The table below shows the performance difference between this approach (called disclaim) and the previous tip-of-tree commit (which used the much slower, channel-based off-thread finalisation).