kaivalnp commented on PR #15272:
URL: https://github.com/apache/lucene/pull/15272#issuecomment-3358029323

   On printing some JVM inlining internals, I came across entries like:
   ```
    @ 35   
org.apache.lucene.internal.vectorization.PanamaVectorUtilSupport$ArrayLoader::length
 (6 bytes)   inline (hot)   callee changed to  
org.apache.lucene.internal.vectorization.PanamaVectorUtilSupport$MemorySegmentLoader::length
 (13 bytes)   inline (hot)   callee changed to  
org.apache.lucene.internal.vectorization.PanamaVectorUtilSupport::dotProductBody
 (250 bytes)    \-> TypeProfile (1028/43516 counts) = 
org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport$MemorySegmentLoader
   callee changed to  
org.apache.lucene.internal.vectorization.PanamaVectorUtilSupport::dotProductBody
 (250 bytes)    \-> TypeProfile (42488/43516 counts) = 
org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport$ArrayLoader
   ```
   
   ..so I turned off JVM method inlining for those [internal 
classes](https://github.com/apache/lucene/blob/cd88a97a63a97dc857d692ec3eb73b229bb5f372/lucene/core/src/java25/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java#L323-L359)
 using some compiler directives (so that their callers are compiled separately, 
into more type-appropriate methods)
   
   Here are the results:
   ```
   Benchmark                                                         (size)   
Mode  Cnt  Score   Error   Units
   VectorScorerBenchmark.binaryDotProductMemSeg                        1024  
thrpt   15  6.374 ± 0.026  ops/us
   VectorScorerBenchmark.binaryDotProductMemSegWithVectorDirectives    1024  
thrpt   15  7.401 ± 0.005  ops/us
   ```
   
   Looks like we can regain most of the performance drop from call site 
pollution!


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to