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

Merge strings further #173

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Merge strings further #173

wants to merge 6 commits into from

Conversation

Baptistemontan
Copy link
Owner

There already was some kind of duplicates strings elimination, this is just a PoC to also eliminate duplicate substrings.
This could be further improved because it is not retroactive, so if abcd is registered after bc, the string will be bcabcd where it could only have been abcd.
The substring resolution is a call to str::find, so it's a linear search (maybe even O(n²) ?) and is called for every strings, so it can be pretty expensive depending on the number of strings. For this reason it might be great to gate it behing a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant