rmuir commented on issue #12403: URL: https://github.com/apache/lucene/issues/12403#issuecomment-1612065273
in java 20+ there are at least functions for simple scalar conversions: https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/lang/Float.html#float16ToFloat(short) https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/lang/Float.html#floatToFloat16(float) So it could be used to store data as `short` and then "expand" to float32 for calculations. But doing this would just cost cpu for conversion, save a little space, but give no real advantage of using float16, which is much faster vector processing. Here is link to their in-progress half-float vectorization: https://github.com/openjdk/panama-vector/blob/vectorIntrinsics%2Bfp16/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/HalffloatVector.java afaik its not even in 21 yet so not yet usable. -- 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