Engineering Category: Cryptographic Mixing, Checksums & Wire Integrity
Best Use in Production: Fast wire-speed packet checksum verification, case-folded label hashing, and frame integrity sealing on network ingress paths.
When to Select This Capsule: Holds the #1 Equivalence Crown across 2 functionally identical implementations (fastest verified hardware _rdtsc). Multi-step compute kernel (26681929/200000 cyc/op); best used at frame, block, or batch aggregation boundaries.
Snap-Circuit Wiring Role: Slice Ingress / Scanner Stage `(&[u8])->u32` — digests raw byte buffers into scalar tokens or checksums.
.text: 178 B (49 x86_64 insns)374 B)pub const fn crc32_ieee(data: &[u8]) -> u32 {
let mut crc: u32 = 0xFFFF_FFFF;
let mut i = 0;
while i < data.len() {
crc ^= data[i] as u32;
let mut bit = 0;
while bit < 8 {
let mask = (crc & 1).wrapping_neg();
crc = (crc >> 1) ^ (0xEDB8_8320 & mask);
bit += 1;
}
i += 1;
}
!crc
}
rustc -C opt-level=3 x86_64 Disassembly (178 B .text / 49 insns)crc32_ieee:
test rsi, rsi
je .LBB7_1
mov eax, -1
xor ecx, ecx
movdqa xmm0, xmmword ptr [rip + .LCPI7_0]
movdqa xmm1, xmmword ptr [rip + .LCPI7_1]
.LBB7_5:
movzx edx, byte ptr [rdi + rcx]
xor edx, eax
mov eax, edx
and eax, 1
neg eax
mov r8d, edx
shr r8d
and eax, -306674912
xor eax, r8d
mov r8d, eax
shr r8d
movd xmm2, edx
shl edx, 30
sar edx, 31
and edx, -306674912
xor edx, r8d
mov r8d, edx
shr r8d, 6
pshufd xmm2, xmm2, 0
pand xmm2, xmm0
pcmpeqd xmm2, xmm0
pand xmm2, xmm1
shl eax, 26
sar eax, 31
and eax, 1994146192
shl edx, 26
sar edx, 31
and edx, -306674912
xor edx, r8d
xor edx, eax
pshufd xmm3, xmm2, 238
pxor xmm3, xmm2
pshufd xmm2, xmm3, 85
pxor xmm2, xmm3
movd eax, xmm2
xor eax, edx
inc rcx
cmp rsi, rcx
jne .LBB7_5
not eax
ret
.LBB7_1:
xor eax, eax
ret
| Global Rank | Capsule & Domain | Hardware _rdtsc | Latency | Throughput | ELF .text | Ternary Vote | Author Aye |
|---|---|---|---|---|---|---|---|
| #1715 | crc32_ieee (THIS CAPSULE) domain: ayecast-x86_64 | id: d9ce35ad8bc369004fffe7cecb37254d | 26681929/200000 cyc/op | 14476559/400000 ns/op | 400000000/14476559 ops/us | 178 B .text (49 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |
| #1721 | crc32 domain: 8c-chat-x86_64 | id: dac3f7ea821b545438fdf5f43bf3d11c | 25728497/200000 cyc/op | 24503717/400000 ns/op | 400000000/24503717 ops/us | 178 B .text (49 insns) | + (1) | aye::Hue+Gemini(0+1)::x86_64 @ 432Hz |