RaptorQ encode cost: investigate SIMD GF(256) / systematic-only encode to cut the ~24µs setup #31

Closed
opened 2026-07-03 19:11:12 +00:00 by vxfemboy · 1 comment
vxfemboy commented 2026-07-03 19:11:12 +00:00 (Migrated from github.com)

The dominant per-packet CPU term when FEC is active is RaptorQ Encoder::new (~24 µs, the intermediate-symbol solve over GF(256)). Object batching (separate issue) amortizes the per-object setup across N packets, but the absolute encode cost is still the biggest lever for the FEC-active path.

Investigate reducing it directly: (a) whether the raptorq crate's GF(256) matrix math is SIMD-accelerated and whether a faster backend / crate exists; (b) a systematic-encode fast path that generates repair symbols without the full intermediate-symbol solve for small objects; (c) upstreaming an optimization to raptorq. Deep/exploratory — the crypto (AEAD) is already SIMD (~2 µs, not a lever), so FEC is where the remaining per-packet CPU is. Measure with the pipeline_profile example.

The dominant per-packet CPU term when FEC is active is RaptorQ `Encoder::new` (~24 µs, the intermediate-symbol solve over GF(256)). Object batching (separate issue) amortizes the *per-object* setup across N packets, but the *absolute* encode cost is still the biggest lever for the FEC-active path. Investigate reducing it directly: (a) whether the `raptorq` crate's GF(256) matrix math is SIMD-accelerated and whether a faster backend / crate exists; (b) a systematic-encode fast path that generates repair symbols without the full intermediate-symbol solve for small objects; (c) upstreaming an optimization to `raptorq`. Deep/exploratory — the crypto (AEAD) is already SIMD (~2 µs, not a lever), so FEC is where the remaining per-packet CPU is. Measure with the `pipeline_profile` example.
vxfemboy commented 2026-07-12 23:49:39 +00:00 (Migrated from github.com)

Obsolete after the FEC codec swap in #50: RaptorQ was replaced by a small-K systematic Reed–Solomon codec (encode ~26 µs → ~1.33 µs). The ~24 µs RaptorQ per-object setup this issue targets no longer exists, so the motivation is gone. Closing.

Obsolete after the FEC codec swap in #50: RaptorQ was replaced by a small-K systematic Reed–Solomon codec (encode ~26 µs → ~1.33 µs). The ~24 µs RaptorQ per-object setup this issue targets no longer exists, so the motivation is gone. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
femboy/yip#31
No description provided.