Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
@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