The Wayback Machine - https://web.archive.org/web/20240912144815/https://github.com/dotnet/runtime/pull/98901
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

Skip long values when building Rabin-Karp buckets in SearchValues #98901

Merged
merged 1 commit into from
Mar 2, 2024

Conversation

MihaZupan
Copy link
Member

We already have an optimization that skips building the buckets altogether if all the values are longer than MaxInputLength.
This change excludes such long values that can never match if we do end up building the buckets, slightly reducing memory consumption, as well as potentially reducing the amount of wasted confirmations we have to do when searching.

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

ghost commented Feb 25, 2024

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

Issue Details

We already have an optimization that skips building the buckets altogether if all the values are longer than MaxInputLength.
This change excludes such long values that can never match if we do end up building the buckets, slightly reducing memory consumption, as well as potentially reducing the amount of wasted confirmations we have to do when searching.

Author: MihaZupan
Assignees: MihaZupan
Labels:

area-System.Buffers

Milestone: 9.0.0

@MihaZupan MihaZupan force-pushed the searchvalues-string-longRabinKarp branch from 45ca924 to 09eba1b Compare March 2, 2024 03:13
@MihaZupan MihaZupan merged commit cd5587d into dotnet:main Mar 2, 2024
176 of 178 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 2, 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.

2 participants