Skip to content
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

Reduce ProbabilisticWithAsciiCharSearchValues overhead on non-ASCII texts #89224

Merged
merged 1 commit into from Jul 20, 2023

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 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
168 checks passed
@dotnet dotnet 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.

None yet

3 participants