-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
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
) -- 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
out of java25/
) + users that do not enable vectorization can score vectors off-heap