Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 1.02 KB

File metadata and controls

30 lines (25 loc) · 1.02 KB

provia-worker

Context

  • docs: docs/*.md

Build / Test rule

  • Always run with: RUSTFLAGS="-A warnings"

Commands

  • Integration test:
    • cargo test -p provia-worker --test dag_correct --features test-utils -- --nocapture
  • Bench:
    • REUSE_PREPROC=1 NUM_ITERS=1 bash examples/run_e2e.sh

Code organization order (within each file)

  1. Core logic types
  2. Core logic impls
  3. Core logic funcs
  4. Helper types
  5. Helper impls
  6. Helper funcs

Performance rules

  • Avoid clone(), to_vec(), collect() (including implicit collects) on hot paths unless unavoidable. Prefer: borrowing, iter_mut, chunks_exact(_mut), split_at_mut, SmallVec, preallocation with with_capacity, extend_from_slice, and iterator fusion.
  • Avoid repeated full passes over large vectors: combine passes; compute multiple derived arrays in one traversal.
  • Prefer par_iter / into_par_iter for large independent work: only if thread-safe + no ordering side effects.
  • Avoid extra buffering between stages unless it reduces comms or enables parallelism.