kaivalnp opened a new issue, #15284: URL: https://github.com/apache/lucene/issues/15284
### Description Java's Panama API was finalized in JDK22, which makes it possible to access both on and off-heap memory without special MR-JAR requirements in Lucene However for vector search, our code for Panama + Vector API is tightly coupled (see [`PanamaVectorUtilSupport`](https://github.com/apache/lucene/blob/602bfbd9af0ee9027de45c1572527eee6b073841/lucene/core/src/java25/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java#L57)) -- so a user can only benefit from off-heap improvements when they have vectorization enabled (`--add-modules jdk.incubator.vector`) Should we separate classes for the two? This would mean having all vector comparisons support on and off-heap versions, and only keeping functions related to vectorization in `java25/` (i.e. in an MR-JAR) IMO it would provide a cleaner separation of functionality and simplify code a bit too (for e.g. we can move classes like [`Lucene99MemorySegmentByteVectorScorer`](https://github.com/apache/lucene/blob/602bfbd9af0ee9027de45c1572527eee6b073841/lucene/core/src/java25/org/apache/lucene/internal/vectorization/Lucene99MemorySegmentByteVectorScorer.java#L30) out of `java25/`) + users that do not enable vectorization can score vectors off-heap -- 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]
