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

Specialize by length in single-value SearchValues<string> #96429

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

MihaZupan
Copy link
Member

Fixes #96142 - pretty much a revert of 2e70415 from #88394.

Method Toolchain Word Mean Error Ratio
Count main the 146.1 us 2.83 us 1.00
Count pr the 119.7 us 0.96 us 0.82
CountIgnoreCase main the 169.5 us 2.99 us 1.00
CountIgnoreCase pr the 150.4 us 0.51 us 0.89
Count main that 71.10 us 0.229 us 1.00
Count pr that 62.66 us 0.237 us 0.88
CountIgnoreCase main that 79.90 us 0.197 us 1.00
CountIgnoreCase pr that 74.46 us 1.221 us 0.93
Count main Holmes 49.58 us 0.151 us 1.00
Count pr Holmes 48.54 us 0.663 us 0.98
CountIgnoreCase main Holmes 59.90 us 0.126 us 1.00
CountIgnoreCase pr Holmes 59.95 us 0.623 us 1.00
Count main something 44.72 us 0.281 us 1.00
Count pr something 44.10 us 0.331 us 0.99
CountIgnoreCase main something 54.12 us 0.221 us 1.00
CountIgnoreCase pr something 54.59 us 0.106 us 1.01

Looking at the benchmark from #96142

Method Toolchain Mean Error Ratio
RegularCaseInsensitive main 26.12 ns 0.195 ns 1.00
RegularCaseInsensitive pr 25.43 ns 0.366 ns 0.97
OptimizedCaseInsensitive main 56.46 ns 0.770 ns 1.00
OptimizedCaseInsensitive pr 20.72 ns 0.337 ns 0.37
RegularCaseSensitive main 13.95 ns 0.114 ns 1.00
RegularCaseSensitive pr 14.10 ns 0.179 ns 1.01
OptimizedCaseSensitive main 56.65 ns 0.850 ns 1.00
OptimizedCaseSensitive pr 10.38 ns 0.174 ns 0.18

@MihaZupan MihaZupan added this to the 9.0.0 milestone Jan 3, 2024
@MihaZupan MihaZupan self-assigned this Jan 3, 2024
@ghost
Copy link

ghost commented Jan 3, 2024

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

Issue Details

Fixes #96142 - pretty much a revert of 2e70415 from #88394.

Method Toolchain Word Mean Error Ratio
Count main the 146.1 us 2.83 us 1.00
Count pr the 119.7 us 0.96 us 0.82
CountIgnoreCase main the 169.5 us 2.99 us 1.00
CountIgnoreCase pr the 150.4 us 0.51 us 0.89
Count main that 71.10 us 0.229 us 1.00
Count pr that 62.66 us 0.237 us 0.88
CountIgnoreCase main that 79.90 us 0.197 us 1.00
CountIgnoreCase pr that 74.46 us 1.221 us 0.93
Count main Holmes 49.58 us 0.151 us 1.00
Count pr Holmes 48.54 us 0.663 us 0.98
CountIgnoreCase main Holmes 59.90 us 0.126 us 1.00
CountIgnoreCase pr Holmes 59.95 us 0.623 us 1.00
Count main something 44.72 us 0.281 us 1.00
Count pr something 44.10 us 0.331 us 0.99
CountIgnoreCase main something 54.12 us 0.221 us 1.00
CountIgnoreCase pr something 54.59 us 0.106 us 1.01

Looking at the benchmark from #96142

Method Toolchain Mean Error Ratio
RegularCaseInsensitive main 26.12 ns 0.195 ns 1.00
RegularCaseInsensitive pr 25.43 ns 0.366 ns 0.97
OptimizedCaseInsensitive main 56.46 ns 0.770 ns 1.00
OptimizedCaseInsensitive pr 20.72 ns 0.337 ns 0.37
RegularCaseSensitive main 13.95 ns 0.114 ns 1.00
RegularCaseSensitive pr 14.10 ns 0.179 ns 1.01
OptimizedCaseSensitive main 56.65 ns 0.850 ns 1.00
OptimizedCaseSensitive pr 10.38 ns 0.174 ns 0.18
Author: MihaZupan
Assignees: MihaZupan
Labels:

area-System.Buffers

Milestone: 9.0.0

@MihaZupan MihaZupan changed the title Searchvalues string valuelength Specialize by length in single-value SearchValues<string> Jan 3, 2024
Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Thanks!

@MihaZupan MihaZupan merged commit 7957edc into dotnet:main Jan 3, 2024
178 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2024
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.

New SearchValues<string> API doesn't use vectorized equality comparison once it finds a candidate
2 participants