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

We should be using Substring #70

Open
sharplet opened this issue Apr 17, 2019 · 0 comments
Open

We should be using Substring #70

sharplet opened this issue Apr 17, 2019 · 0 comments

Comments

@sharplet
Copy link
Owner

While working on #69, I realised that we’re doing far more string copying than we should be. The built in Substring type is a perfect way to represent substrings as “real” strings in a performant way. MatchResult is a bundle of ranges that map onto a single string, and should really be exposing Substring in its API as much as possible to avoid the many unnecessary copies.

It would have been nice if I’d noticed this before 2.0, but unfortunately that ship has sailed. If we get another opportunity to make breaking changes, this is a perfect one.

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

No branches or pull requests

1 participant