Engineering Category: Lossless Wire & Structural Compression
Best Use in Production: Zero-allocation integer bit-packing, variable-length encoding, and stream framing for sovereign wire protocols.
When to Select This Capsule: Verified baseline member of a 2-capsule Equivalence Class; useful as a reference or cross-validation peer. Low-latency L1-resident kernel (2090273/200000 cyc/op); well-suited for high-frequency pipeline stages.
Snap-Circuit Wiring Role: Slice Ingress / Scanner Stage `(&[u8],usize)->usize` — digests raw byte buffers into scalar tokens or checksums.
.text: 60 B (14 x86_64 insns)163 B)pub fn skip_ws(bytes: &[u8], mut i: usize) -> usize {
while i < bytes.len() && matches!(bytes[i], b' ' | b'\t' | b'\r' | b'\n') {
i += 1;
}
i
}
rustc -C opt-level=3 x86_64 Disassembly (60 B .text / 14 insns)skip_ws:
mov rax, rdx
cmp rdx, rsi
jae .LBB7_6
movabs rcx, 4294977024
.LBB7_2:
movzx edx, byte ptr [rdi + rax]
cmp rdx, 32
ja .LBB7_6
bt rcx, rdx
jae .LBB7_6
inc rax
cmp rsi, rax
jne .LBB7_2
mov rax, rsi
.LBB7_6:
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #639 | skip_utf8_char domain: hoover-x86_64 | id: 6bd7862f1da208a4ccdcdeb53990512f | 1500001/200000 cyc/op | 1428697/400000 ns/op | 400000000/1428697 ops/us | 63 B .text (21 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |
| #1229 | skip_ws (THIS CAPSULE) domain: smart-tree | id: 5ceb292afe600d73b788cf4b16bc4b10 | 2090273/200000 cyc/op | 995651/200000 ns/op | 200000000/995651 ops/us | 60 B .text (14 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |