Skip to content

Add benchmarks for HDC encoding throughput #1

@Tristan-Stoltz-ERC

Description

@Tristan-Stoltz-ERC

Summary

Measure and track HDC encoding performance across different input types (text, numeric, categorical). The encoding pipeline is in symthaea-core/src/hdc/.

What to benchmark

Add criterion benchmarks that track:

  • Single word encoding time — currently measured at ~97ns warm
  • Batch encoding throughput — ~379µs for a 10-word sentence (12% of cycle budget)
  • Binding operation speed — XOR-based bind, cyclic permutation, bundle (majority)
  • Similarity computation — Hamming distance on 16,384-dimensional binary hypervectors

Why this matters

HDC encoding is ~13.6% of the cognitive cycle. As we scale to longer inputs and more modalities, tracking regression is critical. The cognitive loop runs at ~234Hz (4.3ms/cycle) in release mode.

Getting started

  1. Look at existing benchmarks in benches/ for patterns
  2. The main encoding entry point is the TextEncoder in symthaea-core/src/hdc/
  3. Use criterion with BenchmarkGroup for organized reporting
  4. Run with cargo bench -p symthaea-core

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions