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

Use String#squeeze instead of String#gsub #2239

Merged
merged 1 commit into from
Dec 20, 2018

Conversation

okkez
Copy link
Contributor

@okkez okkez commented Dec 20, 2018

Because String#squeeze is about 7x faster than String#gsub.
See also https://gist.github.com/okkez/6e199011505c6db7e2e1003cc94f8cbc

Because String#squeeze is about 7x faster than String#gsub.
See also https://gist.github.com/okkez/6e199011505c6db7e2e1003cc94f8cbc

Signed-off-by: Kenji Okimoto <[email protected]>
@okkez
Copy link
Contributor Author

okkez commented Dec 20, 2018

I will send a PR for #1862 after this PR is merged.

@repeatedly repeatedly merged commit 7f2bea8 into fluent:master Dec 20, 2018
@repeatedly
Copy link
Member

I first knew this method :)

@okkez okkez deleted the string-squeeze branch December 20, 2018 04:01
@okkez
Copy link
Contributor Author

okkez commented Dec 20, 2018

Thank you!

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.

2 participants