uschindler commented on PR #12311:
URL: https://github.com/apache/lucene/pull/12311#issuecomment-1559863229

   > > should we zero-pad before computing the dot-products? It wouldn't affect 
the result and sounds like it would be faster
   > 
   > I don't think so. the code wouldnt even know what size to pad it to. for 
float functions the logic currently happens to be "4 x preferred vector size", 
which would be a multiple of 16 on my m1 mac, multiple of 32 on my dual-core 
laptop, multiple of 64 on @ChrisHegarty's rocketlake. and on a machine not 
supporting panama vectorization, padding would just make things slower.
   
   I would not do that in Lucene code. My idea would be to just round up to 
next power of 2 (like chunksize in MmapDirectory) in the implementation. The 
problem is that the original array is to small, and we can't easily extend it 
without reallocate.
   
   So I agree: don't enforce it on higher level. I'd just change luceneutil to 
use another vector size than 100. 😉
   
   > I think instead these data scientists should have some sympathy for the 
hardware and use power of two sizes.
   
   👍


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