uschindler commented on issue #12482:
URL: https://github.com/apache/lucene/issues/12482#issuecomment-1660738848

   Hi,
   
   > > The problem with older panama vector apis (around java 17) was that 
there was no real byte/float buffer interop available. Implementations at that 
time still copied to heap.
   > 
   > Ah ok. I think I'm still missing something. We don't want a ByteBuffer or 
MemorySegment per vector, right? This would be too much garbage. We just want 
to return a VectorXX loaded with the values from a given position and length.
   
   It creates garbage in all cases. It does not matter if it returns a slice of 
a MemorySegment or a Buffer. Both of them will be killed by escape analysis. I 
see no problem with this. We can't fully remove all instances, because vectors 
are non mutable. So the DataInput must return a new instance anyways. It does 
not matter if it is a FloatBuffer or FloatVector.
   


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to