You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/03/10 16:02:06 UTC

[GitHub] [lucene] donnerpeter commented on a change in pull request #4: LUCENE-9831: Hunspell GeneratingSuggester: faster flag & case checks, less allocations

donnerpeter commented on a change in pull request #4:
URL: https://github.com/apache/lucene/pull/4#discussion_r591650328



##########
File path: lucene/analysis/common/src/java/org/apache/lucene/analysis/hunspell/FlagEnumerator.java
##########
@@ -79,6 +79,36 @@ boolean hasFlag(int entryId, char flag) {
       return false;
     }
 
+    boolean hasAnyFlag(int entryId, char[] sortedFlags) {

Review comment:
       We can check presence of any flag of the given sorted set faster than N `hasFlag` calls by walking two sorted arrays simultaneously.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org