Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-14 Thread via GitHub
rmuir closed issue #12621: Make `byte[]` vector comparisons faster! (if possible) URL: https://github.com/apache/lucene/issues/12621 -- 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 comm

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-14 Thread via GitHub
rmuir commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1763056704 From my analysis, code being generated is correct. recommend to explore half-float instead for better performance and space tradeoffs. -- This is an automated message from the Apach

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-09 Thread via GitHub
rmuir commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1753202064 @benwtrent I think a big source of confusion is that while the data might be `byte`, the related functions return 4-byte `int` and 4-byte `float` so from a vector api perspective, the

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-09 Thread via GitHub
benwtrent commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1753021709 Thank you @rmuir && @ChrisHegarty for digging into this! The current Panama Vector API makes doing this kind of thing frustrating. Thank y'all for wrestling with it to make

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-07 Thread via GitHub
rmuir commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1751903073 @benwtrent I looked into this more and eeked a bit more out: https://github.com/apache/lucene/pull/12632 -- This is an automated message from the Apache Git Service. To respond to t

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-04 Thread via GitHub
rmuir commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1747775200 > Actually it is worse: Java 20 introduced conversion between short/float, but we got neither a native `float16` datatype nor vector support. In short: completely unuseable. We

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-04 Thread via GitHub
uschindler commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1747206287 See https://github.com/openjdk/jdk/pull/9422 (Java 20) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use th

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-04 Thread via GitHub
uschindler commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1747204954 Actually it is worse: Java 20 introduced conversion between short/float, but we got neither a native `float16` datatype nor vector support. In short: completely unuseable. 🤮 --

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-04 Thread via GitHub
rmuir commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1747066837 My recommendation: stop messing around with `byte` and start thinking about the new 16-bit half-float support that is present in Java 21. Unfortunately the half-float *vectorization*

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-04 Thread via GitHub
rmuir commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1747044386 As far as the ARM goes, the fact it has only 128-bit SIMD is the limiting factor. For e.g. AVX-256, we use 64-bit vector of 8 byte values -> 128 bit vector of 8 short values ->

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-04 Thread via GitHub
rmuir commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1747026111 Also their suggested replacement of 3 instructions for the `VPDPBUSD` is: > Likewise, for 8-bit values, three instructions are needed - VPMADDUBSW which is used to multiply two

Re: [I] Make `byte[]` vector comparisons faster! (if possible) [lucene]

2023-10-04 Thread via GitHub
rmuir commented on issue #12621: URL: https://github.com/apache/lucene/issues/12621#issuecomment-1747002969 the type conversions are what makes it slow. for float case it is the equiv of: ``` float x = something; float y = something; float z = something; // no conversions f