Skip to content
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
This repository was archived by the owner on Nov 21, 2026. It is now read-only.

bindings: query()/command() parameters that hold a Java array take the slow general path #276

Closed

Description

@tae898

Profiling the dense lane's insert (one SQL INSERT per vector with :e bound to a Java float[] from to_java_float_array) showed about 11 us per call in Database._java_parameters: the scalar fast path refuses any non-scalar value, so a dict holding a Java array goes through convert_python_to_java, which returns the array unchanged anyway. Measured on the official 26.10.1 wheel at 100k vectors, cores 4-7, 5 runs per arm: extending the fast path to values that are already Java arrays takes the insert from 32.9 to 27.0 us per vector (-18%), with the same count and recall.

Fix: let the fast path accept values that are JPype Java arrays (isinstance(v, jpype.JArray)), for named and positional parameters; the general path's result for them is the same object.

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