rmuir commented on a change in pull request #18:
URL: https://github.com/apache/lucene/pull/18#discussion_r595068893



##########
File path: lucene/core/src/java/org/apache/lucene/util/VectorUtil.java
##########
@@ -17,16 +17,123 @@
 
 package org.apache.lucene.util;
 
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
+import java.util.Base64;
+
 /** Utilities for computations with numeric arrays */
 public final class VectorUtil {
 
   private VectorUtil() {}
 
+  // org.apache.lucene.util.VectorUtilSIMD#dotProduct(float[], float[])
+  private static final String SIMD_BASE64 =
+      
"yv66vgAAADwAbQoAAgADBwAEDAAFAAYBABBqYXZhL2xhbmcvT2JqZWN0AQAGPGluaXQ+AQADKClW\n"

Review comment:
       start with changing it to use `byte[]` instead of `float[]`. For the 
case of vector 256 this replaces 64 calls each to bytebuffer position, readInt, 
bswap, etc etc with a single `readBytes()` call. And it is easiest next step as 
there will be no alignment issues.
   
   going from bytebuffer is harder.




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

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