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

micro performance optimization #97

Merged
merged 1 commit into from
Sep 25, 2017
Merged

Conversation

danielnaber
Copy link
Collaborator

areEqual() runs containsKey() and then get(), I think it's faster by running get() directly? I found that areEqual takes 7% of all the CPU usage on languagetool.org, so any optimization there is welcome.

@dweiss
Copy link
Member

dweiss commented Sep 25, 2017

This should have been eliminated by hotspot and make no practical difference, actually -- I am a bit surprised it increases performance. But I like the patch nonetheless.

@dweiss dweiss merged commit abbb816 into morfologik:master Sep 25, 2017
@danielnaber
Copy link
Collaborator Author

Just to be clear, I didn't actually measure if there's any improvement, I just found this by looking at the code and thought it cannot do any harm.

@dweiss
Copy link
Member

dweiss commented Sep 25, 2017

Oh, ok. Thanks anyway!

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