Skip to content

Native wheel vector search: the default scalar provider, Highway and the JVM wheel measured (which default to ship?) #153

Closed

Description

@tae898

Timed A/B on the laptop (the rule was written before the run; ab.py --noise, ABBA rounds, round 0 dropped, at least 12 clean pairs per figure, an A/A control): the matched dev pair, native arcadedb and arcadedb-jvm 26.11.1.dev0 (bindings 4d012f3, engine e353330c5c), 100,000 vectors per size, three ways: the native wheel as shipped (its default, scalar vector provider), the same native wheel with ARCADEDB_VECTOR_PROVIDER=native (jvector's Highway kernels), and the JVM wheel. Ratios are medians of per-round ratios with the 95% CI; below 1 means the first-named arm is faster.

vectors (100k) figure native default / JVM native Highway / native default native Highway / JVM
128-d SIFT index build 1.62 [1.6, 1.64] 0.998 [0.995, 1] 1.62 [1.59, 1.65]
128-d SIFT p50, find_nearest 1.42 [1.4, 1.45] 1.06 [1.05, 1.08] 1.52 [1.5, 1.56]
128-d SIFT p50, SQL vectorNeighbors 1.21 [1.18, 1.23] 1.06 [1.06, 1.09] 1.29 [1.28, 1.32]
768-d clustered index build 3 [2.99, 3] 0.462 [0.461, 0.463] 1.39 [1.38, 1.4]
768-d clustered p50, find_nearest 2.09 [2.06, 2.16] 0.862 [0.857, 0.864] 1.82 [1.76, 1.85]
768-d clustered p50, SQL vectorNeighbors 1.49 [1.47, 1.51] 0.813 [0.809, 0.823] 1.22 [1.2, 1.25]
1536-d clustered index build 3.25 [3.22, 3.26] 0.396 [0.395, 0.397] 1.28 [1.28, 1.29]
1536-d clustered p50, find_nearest 2.38 [2.32, 2.43] 0.779 [0.772, 0.785] 1.87 [1.81, 1.89]
1536-d clustered p50, SQL vectorNeighbors 1.75 [1.72, 1.85] 0.702 [0.696, 0.708] 1.24 [1.2, 1.29]

Provider each arm actually ran (read from the running process):

arm wheel provider vector util
A native, default provider DefaultVectorizationProvider DefaultVectorUtilSupport
Z native, default provider (A/A) DefaultVectorizationProvider DefaultVectorUtilSupport
H native, ARCADEDB_VECTOR_PROVIDER=native NativeVectorizationProvider NativeVectorUtilSupport128
B JVM wheel PanamaVectorizationProvider PanamaVectorUtilSupport

What this says, as I read it:

  1. For vector speed the JVM wheel is faster than native in every time figure, with or without Highway (the full table has the safe beam, p99 and serial qps too, all the same way). For memory the native wheel stays the smaller one: its peak RSS against the JVM's is 128-d SIFT 0.505 [0.357, 0.574], 768-d clustered 0.621 [0.569, 0.67], 1536-d clustered 0.66 [0.618, 0.733]. The which-package page should say both in its vector rows, with the intervals.
  2. Highway is a large gain for native at 768 and 1536 dimensions (index build and query p50 in the second column) and a small loss at 128 dimensions. That is a case for making it the native default, or the default above some dimension, but it is a product decision, so this issue only proposes it.
  3. The provider table names NativeVectorUtilSupport128. In jvector's source that class only types a KMeans scan for the JVM vector width (FloatVector.SPECIES_PREFERRED); the distance kernels are Highway's, chosen at run time (jvector-native has AVX2-class and AVX-512 kernels; this CPU has AVX2 and no AVX-512). So the native kernels are not limited to 128 bits. Where the remaining gap to the JVM's Panama path comes from (the cost of each native call, ahead-of-time against JIT compilation) is not measured here.

Edited 2026-10-31: point 3 corrected after reading jvector's source; it first read the class name as a 128-bit limit.

No PR yet: which default to ship (scalar, Highway, or by dimension) and the docs change wait for a decision here.

Activity

  1. tae898 commented on Oct 31, 2026

    @tae898
    CollaboratorAuthor

    Correction to point 3 (edited in place above): NativeVectorUtilSupport128 is not a 128-bit kernel limit. In jvector's source that class only types a KMeans scan for the JVM vector width; the distance kernels are Highway's, chosen at run time (jvector-native has AVX2-class and AVX-512 kernels). The measured numbers are unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions