original-brownbear commented on PR #13544:
URL: https://github.com/apache/lucene/pull/13544#issuecomment-2212636552

   Thanks Adrien!
   
   > do you have a benchmark / profiler output that shows the improvement?
   
   The nightlies show this:
   
   ```
   0.49%         4090M         
java.lang.invoke.DirectMethodHandle#allocateInstance()
                                 at 
java.lang.invoke.DirectMethodHandle$Holder#newInvokeSpecial()
                                 at 
java.lang.invoke.Invokers$Holder#linkToTargetMethod()
                                 at java.util.Comparator#comparingDouble()
                                 at 
org.apache.lucene.search.MaxScoreBulkScorer#partitionScorers()
                                 at 
org.apache.lucene.search.MaxScoreBulkScorer#score()
                                 at org.apache.lucene.search.BulkScorer#score()
                                 at 
org.apache.lucene.search.IndexSearcher#search()
   ```
   
   This change makes it go away :) So it's essentially saving 0.5% of all 
allocations here. I couldn't reproduce a big/signifcant QPS change as a result 
since we're not CPU bound when running the benchmark (this might change with 
the `AtomicLong` change in the other PR ;)), but I think saving those GBs from 
getting allocated in the first place is enough reason to fix this kind of spot 
:)


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