Skip to content

Reuse shared batch read buffers - #50

Merged
bjmeetsfo merged 1 commit into
mainfrom
reuse-shared-batch-read-buffers
Sep 6, 2026
Merged

Reuse shared batch read buffers#50
bjmeetsfo merged 1 commit into
mainfrom
reuse-shared-batch-read-buffers

Conversation

@bjmeetsfo

Copy link
Copy Markdown
Collaborator

Summary

  • add get_shared_batch_into so retrieval callers can reuse a caller-owned result buffer
  • keep get_shared_batch behavior and shared-buffer accounting intact
  • switch the batch read benchmark to the reusable-buffer path and add regression coverage for capacity preservation

Validation

  • cargo fmt -- --check
  • cargo check --locked --no-default-features --examples -q
  • cargo test --locked --no-default-features "get_shared_batch_into" -- --test-threads=1
  • cargo test --locked --no-default-features -q
  • python3 -m py_compile tools/validate_backend_report.py tools/compare_backend_reports.py tools/emit_backend_operator_log.py tools/gen_metrics.py tools/validate_grafana_dashboard.py
  • python3 tools/validate_grafana_dashboard.py
  • git diff --check
  • cargo run --release --no-default-features --example batch_read_cost

Benchmark

4096 resident values of 64 bytes, memory hits only, median of 9 passes:

  • batch 64: get_batch 1292.6 ns/key, shared_batch 966.8 ns/key
  • batch 1024: get_batch 1564.2 ns/key, shared_batch 1489.1 ns/key

@bjmeetsfo
bjmeetsfo merged commit b068718 into main Sep 6, 2026
4 of 5 checks passed
@bjmeetsfo
bjmeetsfo deleted the reuse-shared-batch-read-buffers branch September 6, 2026 16:07
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