cinsttool opened a new pull request, #13254:
URL: https://github.com/apache/lucene/pull/13254

   …Accumulator.java
   
   ### Description
   Hi,
   
   We find that there exist container inefficiencies in FieldInfos.java and 
CompetitiveImpactAccumulator.java. 
   
   In particular, at line 126 in CompetitiveImpactAccumulator.java, the for 
loop copies elements from impact to freqNormPairs. However, it is evident that 
when otherFreqNormPairs is not empty, i.e., when the condition at line 120 
evaluates to false, the construction of the impact object is unnecessary.
   
   For FieldInfos.java, at line 169, there maybe a redundant operation that 
`Arrays.asList(valuesTemp.toArray(new FieldInfo[0]))` transform List object 
`valuesTemp` to array and then back to List.
   
   We discovered the above containers inefficiencies by our tool cinst. The 
patch is submitted. Could you please check and accept it? We have tested the 
patch on our PC. The patched program works well.
   <!--
   If this is your first contribution to Lucene, please make sure you have 
reviewed the contribution guide.
   https://github.com/apache/lucene/blob/main/CONTRIBUTING.md
   -->
   


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

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

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


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

Reply via email to