bruno-roustant commented on a change in pull request #1270: LUCENE-9237: Faster 
UniformSplit IntersectBlockReader.
URL: https://github.com/apache/lucene-solr/pull/1270#discussion_r382682649
 
 

 ##########
 File path: 
lucene/core/src/java/org/apache/lucene/util/automaton/Operations.java
 ##########
 @@ -1091,25 +1091,33 @@ public static String getCommonPrefix(Automaton a) {
    * @return common prefix, which can be an empty (length 0) BytesRef (never 
null)
    */
   public static BytesRef getCommonPrefixBytesRef(Automaton a) {
 
 Review comment:
   Some optimizations in this method (always called to build the commonSuffix 
for CompiledAutomaton for infinite language, e.g. PrefixQuery and 
WildcardQuery). Lazy create structures (WildcardQuery may not have a first 
single-path state), and only one visited.add() call. This speeds up mainly 
WildcardQuery (a couple % in my luceneutil measures).

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to