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

Fix for finding the longest word in terms of size instead of characte… #95

Conversation

davevdveen
Copy link

…r count

Issue #94

@CLAassistant
Copy link

CLAassistant commented May 1, 2017

CLA assistant check
All committers have signed the CLA.

@ghost
Copy link

ghost commented May 1, 2017

1 Warning
⚠️ Any source code changes should have an entry in CHANGELOG.md or have #trivial in their title.

Generated by 🚫 Danger

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for the diff. We've seen thread-safety issues in the past with boundingRectWithSize: despite the claims of the documentation, and the performance penalty here is likely to be tremendous.

One improvement we can make off the bat is to avoid using rangeOfString: and instead use enumerateSubstrings which will give us the ranges directly. Beyond that, I'll try to find time to profile this change in the near future, but of course you're right that this algorithm is correct.

@nguyenhuy
Copy link
Member

nguyenhuy commented Nov 28, 2017

@Adlai-Holler @davevdveen Please follow up on this PR.

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

Successfully merging this pull request may close these issues.

4 participants