perf: mark ReaderT context argument as borrow#12942
Open
Conversation
d29bfab to
b88612d
Compare
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
b88612d to
53c7dc9
Compare
53c7dc9 to
4771717
Compare
4771717 to
1fdf271
Compare
Contributor
Author
|
!bench |
|
Benchmark results for 1fdf271 against 511be30 are in. Significant changes detected! @hargoniX
Large changes (4✅)
Medium changes (15✅)
and 1 hidden Small changes (1201✅) Too many entries to display here. View the full report on radar instead. |
ad286ae to
6d31ce7
Compare
Contributor
Author
|
!bench |
f57c1c6 to
d34f8f2
Compare
|
Benchmark results for d34f8f2 against 4a62d4a are in. Significant changes detected! @hargoniX
Large changes (9✅)
Medium changes (29✅) Too many entries to display here. View the full report on radar instead. Small changes (1118✅, 6🟥) Too many entries to display here. View the full report on radar instead. |
This file contains hidden or 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
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 PR marks the context argument of
ReaderTas borrowed, causing a wide spread of useful borrow annotations throughout the entire meta stack which reduces RC pressure. This introduces a crucial new behavior: When modifyingReaderTcontext, e.g. throughwithReaderthis will almost always cause an allocation. Given that theReaderTcontext is frequently used in a non-linear fashion anyways we think this is an acceptable behavior.