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

Task: StringBuilderExtensions: Use StringBuilder.GetChunks() for IndexOf() and LastIndexOf() #57

Closed
NightOwl888 opened this issue Dec 18, 2023 · 1 comment
Assignees
Labels
design good first issue Good for newcomers is:enhancement New feature or request pri:normal

Comments

@NightOwl888
Copy link
Owner

Indexing a StringBuilder is painfully slow because it has to enumerate chunks every time you specify an index. Performance can be greatly improved by using the GetChunks() method (when supported). More discussion about this is here: dotnet/runtime#26207

We should use this for the IndexOf() and LastIndexOf() methods, which are used fairly commonly on StringBuilder in Java.

@NightOwl888 NightOwl888 added is:enhancement New feature or request good first issue Good for newcomers design pri:normal up for grabs This issue is open to be worked on by anyone labels Dec 18, 2023
@NightOwl888 NightOwl888 self-assigned this Dec 20, 2023
@NightOwl888 NightOwl888 removed the up for grabs This issue is open to be worked on by anyone label Dec 20, 2023
@NightOwl888
Copy link
Owner Author

Fixed in #63.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design good first issue Good for newcomers is:enhancement New feature or request pri:normal
Projects
None yet
Development

No branches or pull requests

1 participant