Skip to content

feat: add persistence benchmarks for JSON vs bitcode serialization#321

Merged
deven96 merged 8 commits intomainfrom
feature/persistence-benchmarks
Mar 23, 2026
Merged

feat: add persistence benchmarks for JSON vs bitcode serialization#321
deven96 merged 8 commits intomainfrom
feature/persistence-benchmarks

Conversation

@deven96
Copy link
Owner

@deven96 deven96 commented Mar 23, 2026

Summary

Adds comprehensive persistence benchmarks comparing JSON (serde_json) vs bitcode serialization performance for ahnlich store persistence.

Changes

Benchmarks

  • Added new persistence benchmark suite testing 32 scenarios:
    • Sizes: 100, 1K, 10K, 100K entries
    • Index configs: no-index, HNSW (ef_construction=400, m=64)
    • Formats: JSON (serde_json) vs bitcode (with serde feature)
    • Operations: serialize & deserialize
  • Realistic test data: 1024-dim embeddings with 3 metadata fields
  • File I/O matching real persistence (atomic writes with temp files)

Dependencies

  • Removed unused bincode dependency
  • Added bitcode (with serde feature) as dev-dependency
  • Added chrono for timestamp generation in benchmarks

CI

  • Added separate persistence-benchmark.yml workflow
  • Triggers only when PR has benchmark-persistence label
  • Uses same structure as existing database benchmarks
  • Posts comparison results as PR comment

Testing

Benchmarks compile and run successfully:

cargo bench --bench persistence

@deven96 deven96 added the benchmark-persistence Trigger persistence benchmark CI workflow label Mar 23, 2026
@deven96 deven96 requested a review from Iamdavidonuh March 23, 2026 11:15
@github-actions
Copy link

github-actions bot commented Mar 23, 2026

Test Results

175 tests   174 ✅  10m 9s ⏱️
 32 suites    0 💤
  4 files      1 ❌

For more details on these failures, see this check.

Results for commit ffc1755.

♻️ This comment has been updated with latest results.

@deven96 deven96 merged commit ce15ce2 into main Mar 23, 2026
4 of 7 checks passed
@deven96 deven96 deleted the feature/persistence-benchmarks branch March 23, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

benchmark-persistence Trigger persistence benchmark CI workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant