Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove unnecessary spills from BufferedStream.ReadAsync#55190

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
adamsitnik merged 1 commit intodotnet:mainfromstephentoub:removespill
Jul 6, 2021

Conversation

@stephentoub
Copy link
Member

Saves a field in each state machine.

@ghostghost added the area-System.IO labelJul 6, 2021
@ghost
Copy link

Tagging subscribers to this area: @dotnet/area-system-io
See info inarea-owners.md if you want to be subscribed.

Issue Details

Saves a field in each state machine.

Author:stephentoub
Assignees:-
Labels:

area-System.IO

Milestone:-

Copy link
Member

@adamsitnikadamsitnik left a comment

Choose a reason for hiding this comment

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

LGTM, however I wish our compiler could optimize that for us.

@adamsitnikadamsitnik added this to the6.0.0 milestoneJul 6, 2021
@adamsitnik
Copy link
Member

the failures are unrelated, I am merging

@adamsitnikadamsitnik merged commitd25af09 intodotnet:mainJul 6, 2021
@stephentoubstephentoub deleted the removespill branchJuly 6, 2021 10:16
@stephentoub
Copy link
MemberAuthor

I wish our compiler could optimize that for us.

For the most part this is by design: to maintain order of operations, if you haveA() + await B() the compiler has to evaluateA() first, at which point it has to store the result somewhere across the await. In this constrained case, whereA() is actually a local whose address is never exposed, isn't passed by ref, isn't captured by a closure, etc., it could probably avoid it, and for that I openeddotnet/roslyn#54629. But it's also possible the rewards from such a constrained optimization are limited (e.g. these were the only two occurrences in product code of+ await in all of dotnet/runtime), and there may be reasons why even for this case the compiler might face correctness issues.

adamsitnik reacted with thumbs up emoji

@adamsitnik
Copy link
Member

@stephentoub thanks!

@ghostghost locked asresolvedand limited conversation to collaboratorsAug 6, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@adamsitnikadamsitnikadamsitnik approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.0.0

Development

Successfully merging this pull request may close these issues.

2 participants

@stephentoub@adamsitnik

[8]ページ先頭

©2009-2025 Movatter.jp