Skip to content

Conversation

@stephentoub
Copy link
Member

Fixes #56011

I'd updated the implementation to use the new span-based interpolated string handler. The code was simpler/cleaner, but the code was already fairly-tuned direct span-based code, and while the extra overhead was a few nanoseconds, that was a measurable percentage of the overall time. So, I'm reverting it so as not to regress. And while here, I made a few tweaks that give it a small extra boost.

This was already optimized to use spans directly.  Using our new span-based interpolated string handler was simpler code, but a few more nanoseconds.  Reverting.
Make error handling a bit more clear, and use uint formatting rather than int formatting for small perf boost.
@ghost
Copy link

ghost commented Jul 20, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@ghost
Copy link

ghost commented Jul 21, 2021

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

Issue Details

Fixes #56011

I'd updated the implementation to use the new span-based interpolated string handler. The code was simpler/cleaner, but the code was already fairly-tuned direct span-based code, and while the extra overhead was a few nanoseconds, that was a measurable percentage of the overall time. So, I'm reverting it so as not to regress. And while here, I made a few tweaks that give it a small extra boost.

Author: stephentoub
Assignees: -
Labels:

area-System.Runtime

Milestone: -

Copy link
Member

@jeffhandley jeffhandley left a comment

Choose a reason for hiding this comment

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

LGTM

@jeffhandley jeffhandley self-assigned this Jul 24, 2021
@stephentoub stephentoub merged commit 4bf1750 into dotnet:main Jul 24, 2021
@stephentoub stephentoub deleted the fixversiontryformat branch July 24, 2021 13:40
@ghost ghost locked as resolved and limited conversation to collaborators Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Perf] Regressions in Version.ToString and TryFormat

3 participants