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/11 18:59:35 UTC

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

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



##########
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:
       I don't have a problem with the changes here, but it makes me wonder if a bitset is more appropriate data structure? sorry if its a dumb idea, i dont remember the properties of all these flags. but If we are assigning flags numeric ids already, can we get away with using a single bit? bitset intersection has the advantage of using vector instructions.




----------------------------------------------------------------
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