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

   Also wanted to note: we fixed a similar JVM inlining issue in #14874 -- and 
the `PanamaVectorUtilSupport$ArrayLoader` and 
`PanamaVectorUtilSupport$MemorySegmentLoader` classes referenced in this PR 
were actually added there^
   
   I undid those changes locally (move away from 
[`ByteVectorLoader`](https://github.com/apache/lucene/blob/bace2920b4487384e4195a6914c8074c498ae4b5/lucene/core/src/java25/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java#L315),
 wrap `byte[]` in a `MemorySegment` and have all functions work on two 
`MemorySegment`s), but that degrades performance further:
   
   ```
   Benchmark                                                         (size)   
Mode  Cnt  Score   Error   Units
   VectorScorerBenchmark.binaryDotProductMemSeg                        1024  
thrpt   15  1.592 ± 0.065  ops/us
   ```
   
   i.e. the above PR was net-net positive, but left some _more_ performance to 
be reclaimed by sidestepping call site pollution (which we hope to do here)


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