Frustratingly, in some cases, the fastest performance for Lucene vector search requires the user (app developer) to bring their own natively compiled code. Else Lucene falls back to Panama sometimes, else hotspot-optimized java code. I'm not certain about the decision tree.
Yet it's fairly simple to write trivial C code, let modern gcc optimize for specfic CPU architectures, and ask Lucene to insert that dynamic library and use it instead.
Let's make a simple example in luceneutil of how to do this? It'd be at least a place for users to start. Long term, ideally, Lucene would do this out of the box, but the tricky part is the build, hrmph. It's always the build tooling...
Frustratingly, in some cases, the fastest performance for Lucene vector search requires the user (app developer) to bring their own natively compiled code. Else Lucene falls back to Panama sometimes, else hotspot-optimized java code. I'm not certain about the decision tree.
Yet it's fairly simple to write trivial C code, let modern
gccoptimize for specfic CPU architectures, and ask Lucene to insert that dynamic library and use it instead.Let's make a simple example in luceneutil of how to do this? It'd be at least a place for users to start. Long term, ideally, Lucene would do this out of the box, but the tricky part is the build, hrmph. It's always the build tooling...