KEMBAR78
Reduce ProbabilisticWithAsciiCharSearchValues overhead on non-ASCII texts by MihaZupan · Pull Request #89224 · dotnet/runtime · GitHub
Skip to content

Conversation

MihaZupan
Copy link
Member

Small followup after #89155, it looks like checking one character first is a good tradeoff here.

Method Toolchain NewLineFrequency Length AsciiText Mean Error Ratio
ReplaceLineEndings main 0.1 10000 False 14.030 us 0.2180 us 1.00
ReplaceLineEndings pr 0.1 10000 False 21.557 us 0.0933 us 1.54
ReplaceLineEndings pr2 0.1 10000 False 15.030 us 0.0738 us 1.07
ReplaceLineEndings main 0.1 10000 True 16.548 us 0.0696 us 1.00
ReplaceLineEndings pr 0.1 10000 True 8.871 us 0.0254 us 0.54
ReplaceLineEndings pr2 0.1 10000 True 9.019 us 0.0361 us 0.55

@MihaZupan MihaZupan added this to the 8.0.0 milestone Jul 19, 2023
@MihaZupan MihaZupan requested a review from stephentoub July 19, 2023 23:36
@MihaZupan MihaZupan self-assigned this Jul 19, 2023
@ghost
Copy link

ghost commented Jul 19, 2023

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

Issue Details

Small followup after #89155, it looks like checking one character first is a good tradeoff here.

Method Toolchain NewLineFrequency Length AsciiText Mean Error Ratio
ReplaceLineEndings main 0.1 10000 False 14.030 us 0.2180 us 1.00
ReplaceLineEndings pr 0.1 10000 False 21.557 us 0.0933 us 1.54
ReplaceLineEndings pr2 0.1 10000 False 15.030 us 0.0738 us 1.07
ReplaceLineEndings main 0.1 10000 True 16.548 us 0.0696 us 1.00
ReplaceLineEndings pr 0.1 10000 True 8.871 us 0.0254 us 0.54
ReplaceLineEndings pr2 0.1 10000 True 9.019 us 0.0361 us 0.55
Author: MihaZupan
Assignees: MihaZupan
Labels:

area-System.Buffers

Milestone: 8.0.0

@stephentoub stephentoub merged commit 2ee61bb into dotnet:main Jul 20, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 19, 2023
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.

3 participants