Skip to content

Add Qvec.MicroBenchmarks and record the kernel and search baseline - #45

Merged
matengo merged 1 commit into
masterfrom
perf-micro
Sep 18, 2026
Merged

matengo merged 1 commit into
masterfrom
perf-micro

Conversation

@matengo

@matengo matengo commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Add Qvec.MicroBenchmarks and record the kernel and search baseline

BenchmarkDotNet project with three suites: the float distance kernels
(array, span and the pointer variant the graph walk calls) next to
TensorPrimitives as a reference; the int8 quantise/dequantise/dot path;
and one Search call on a 10,000-node index with the memory diagnoser.

The two pointer kernels become internal so they can be measured; Core
gets InternalsVisibleTo for the benchmark project only.

Measured on the reference machine and recorded in design-performance.md
section 2.1: the hot kernels are within 5 % of TensorPrimitives at 768
and 1536 dimensions (the 128-d dot product is 1.5x off), so the kernel
item in the plan is downgraded; a single Search allocates 30-68 KB and
triggers gen1 collections, so the query-scratch item moves to the front.
Sections 4.1/4.2 and the PR table are reordered accordingly.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

BenchmarkDotNet project with three suites: the float distance kernels
(array, span and the pointer variant the graph walk calls) next to
TensorPrimitives as a reference; the int8 quantise/dequantise/dot path;
and one Search call on a 10,000-node index with the memory diagnoser.

The two pointer kernels become internal so they can be measured; Core
gets InternalsVisibleTo for the benchmark project only.

Measured on the reference machine and recorded in design-performance.md
section 2.1: the hot kernels are within 5 % of TensorPrimitives at 768
and 1536 dimensions (the 128-d dot product is 1.5x off), so the kernel
item in the plan is downgraded; a single Search allocates 30-68 KB and
triggers gen1 collections, so the query-scratch item moves to the front.
Sections 4.1/4.2 and the PR table are reordered accordingly.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@matengo
matengo merged commit e8ebef2 into master Sep 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant