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

Dynamic string search algorithm selection #119953

Closed
dg-pb opened this issue Jun 2, 2024 · 1 comment
Closed

Dynamic string search algorithm selection #119953

dg-pb opened this issue Jun 2, 2024 · 1 comment
Labels
performance Performance or resource usage type-feature A feature request or enhancement

Comments

@dg-pb
Copy link
Contributor

dg-pb commented Jun 2, 2024

Feature or enhancement

Proposal:

There is still a bit of ground to cover, but current results indicate that this could turn out to be fruitful.

The main idea is to dynamically switch from Horspool to two-way algorithm.

Below is the performance comparison of current string search versus current state of proposed approach.
Screenshot 2024-06-02 at 21 56 48

The average percentage difference is close to 0, but it is still work in progress.

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/optimize-str-find-aka-fastsearch/54483/13

@dg-pb dg-pb added the type-feature A feature request or enhancement label Jun 2, 2024
@tim-one tim-one added the performance Performance or resource usage label Jun 2, 2024
@sweeneyde
Copy link
Member

Let's discuss the ongoing proposals for fastearch.h here: #119702

@sweeneyde sweeneyde closed this as not planned Won't fix, can't repro, duplicate, stale Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance or resource usage type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants