Skip to content

Avoid some redundant casts in DefaultInterpolatedStringHandler.AppendFormatted #114664

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

Conversation

SimonCropp
Copy link
Contributor

@SimonCropp SimonCropp commented Apr 15, 2025

it is possible i am missing some edge case about how the compiler treats casts

so if this is worse for perf. i would love to know why :)

@Copilot Copilot AI review requested due to automatic review settings April 15, 2025 00:31
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 15, 2025
Copy link
Contributor

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

@stephentoub
Copy link
Member

See https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-9/ and search for "One interesting case for .NET has had to do with structs and casting". It's possible the issue has been addressed enough in .NET 9 that the casting can be fixed up as in this PR, but it would need to be validated first before we could consider taking this.

@stephentoub stephentoub added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Apr 15, 2025
@SimonCropp
Copy link
Contributor Author

@stephentoub based on the extra context, i dont think there is enough value in this. closing, and sorry for the noise

@SimonCropp SimonCropp closed this Apr 15, 2025
@SimonCropp SimonCropp deleted the Avoid-some-redundant-casts-in-DefaultInterpolatedStringHandler.AppendFormatted branch April 15, 2025 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-System.Runtime.CompilerServices community-contribution Indicates that the PR has been added by a community member NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants