Skip to content

bench(native): add parallel sign-rq2 row matching OrdinalDB serving #238

@Fieldnote-Echo

Description

Summary

Add a native BEIR benchmark row for parallel sign-rq2 orchestration that mirrors the OrdinalDB serving path.

Why

PR #237's native benchmark harness currently gives HNSW a threaded path through hnsw.parallel_search, while the sign-rq2 row uses serial sign candidate generation plus serial subset rerank inside the batch loop. OrdinalDB's serving path now drives the ordvec 0.5 caller-owned APIs from rayon workers:

  • split the query batch into chunks
  • each worker calls SignBitmap::top_m_candidates_batched_serial_csr
  • each worker reuses its own SubsetScratch
  • each worker calls RankQuant::search_asymmetric_subset_batched_serial_into
  • workers write directly into their output score/index chunks

Without this row, native benchmark comparisons answer "serial sign-rq2 vs threaded HNSW" rather than "ordvec two-stage vs HNSW under equivalent caller-owned threading."

Proposed benchmark row

Add a row such as ordvec-sign-rq2-par or sign-rq2-par to benchmarks/beir-bench:

  1. Use the same corpus, query batch, k, candidate count, and thread pool size as the existing threaded comparison.
  2. Build SignBitmap + RankQuant exactly like the current sign-rq2 row.
  3. In the timed search closure, split query chunks across the configured rayon pool.
  4. Per worker, allocate/reuse one SubsetScratch and call the serial CSR sign probe plus serial batched subset rerank into the assigned output slice.
  5. Report the same recall/latency/build/storage columns as the existing rows.

Acceptance criteria

  • The new row is apples-to-apples with HNSW for thread count and batch size.
  • The existing serial sign-rq2 row remains, so single-thread/serial behavior is still visible.
  • The benchmark summary makes clear which row is serial and which row is caller-parallel.
  • The row uses public ordvec APIs only; no OrdinalDB dependency in the ordvec benchmark.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    perfPerformance-relevant: scan/SIMD/alloc/memory/parallelismrustPull requests that update rust codetestingTesting / CI / fuzz / bench

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions