Skip to content

Use IndexOfAnyValues in Uri.EscapeString helper - #79024

Merged
MihaZupan merged 1 commit into
dotnet:mainfrom
MihaZupan:indexofanyvalues-uri-escapestring2
Nov 30, 2022
Merged

Use IndexOfAnyValues in Uri.EscapeString helper#79024
MihaZupan merged 1 commit into
dotnet:mainfrom
MihaZupan:indexofanyvalues-uri-escapestring2

Conversation

@MihaZupan

Copy link
Copy Markdown
Member

Contributes to #78204 now that we have #78722

MethodToolchainInputMeanErrorRatio
EscapeDataStringmainAsciiNeedsEscaping8,271.13 ns51.813 ns1.00
EscapeDataStringprAsciiNeedsEscaping5,560.41 ns10.109 ns0.67
EscapeDataStringmainNothingToEscape592.44 ns3.579 ns1.00
EscapeDataStringprNothingToEscape67.00 ns0.557 ns0.11
EscapeDataStringmainUnicode13,090.05 ns102.756 ns1.00
EscapeDataStringprUnicode9,780.85 ns19.247 ns0.75

Things like NothingToEscape will of course improve even further with AVX2 support in IndexOfAnyAsciiSearcher#78863.

@MihaZupanMihaZupan added this to the 8.0.0 milestone Nov 30, 2022
@MihaZupan
MihaZupan requested review from a team and stephentoubNovember 30, 2022 04:38
@ghostghost assigned MihaZupanNov 30, 2022
@ghost

Copy link
Copy Markdown

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

Issue Details

Contributes to #78204 now that we have #78722

MethodToolchainInputMeanErrorRatio
EscapeDataStringmainAsciiNeedsEscaping8,271.13 ns51.813 ns1.00
EscapeDataStringprAsciiNeedsEscaping5,560.41 ns10.109 ns0.67
EscapeDataStringmainNothingToEscape592.44 ns3.579 ns1.00
EscapeDataStringprNothingToEscape67.00 ns0.557 ns0.11
EscapeDataStringmainUnicode13,090.05 ns102.756 ns1.00
EscapeDataStringprUnicode9,780.85 ns19.247 ns0.75

Things like NothingToEscape will of course improve even further with AVX2 support in IndexOfAnyAsciiSearcher#78863.

Author:MihaZupan
Assignees:-
Labels:

area-System.Net

Milestone:8.0.0

Comment threadsrc/libraries/System.Private.Uri/src/System/UriHelper.cs Outdated
Comment threadsrc/libraries/System.Private.Uri/src/System/UriHelper.cs Outdated
Comment threadsrc/libraries/System.Private.Uri/src/System/UriHelper.cs Outdated
Comment threadsrc/libraries/System.Private.Uri/src/System/UriHelper.cs Outdated
@MihaZupan
MihaZupanforce-pushed the indexofanyvalues-uri-escapestring2 branch from 8ff59c4 to 8667bfcCompareNovember 30, 2022 20:16
@MihaZupan
MihaZupan merged commit c01ad86 into dotnet:mainNov 30, 2022
@ghostghost locked as resolved and limited conversation to collaborators Dec 31, 2022
Sign up for freeto 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.

3 participants

@MihaZupan@stephentoub@gfoidl