Best Use & Engineering Application Guide

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. Sub-10-cycle hardware kernel (403171/100000 cyc/op); safe for ultra-hot per-sample or per-packet inner loops.

Snap-Circuit Wiring Role: Specialized Multi-Pin Stage `(i8,i8)->i8` — wire matching input pins via `snap_dag` or `snap_pipeline`.

Hardware _rdtsc: 403171/100000 cycles/op
Latency: 768283/400000 ns/op
Throughput: 400000000/768283 ops/us
Compiled ELF64 .text: 11 B (5 x86_64 insns)
C64 64KB RAM Budget: 3/2048 (96 B source)
Ternary Vote: + (score 1) | Salience: 8765/104
Pure-Rust Capsule Source Code (96 B)
pub fn kleene_nand(a: i8, b: i8) -> i8 {
    let m = a.min(b);
    if m == 0 { 0 } else { -m }
}
rustc -C opt-level=3 x86_64 Disassembly (11 B .text / 5 insns)
kleene_nand:
    mov    eax, edi
    cmp    sil, al
    cmovl    eax, esi
    neg    al
    ret

Head-to-Head Functional Equivalence Class Peers (2 Implementation(s) Matching 64 Test Vectors)

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#20tnand
domain: ternary | id: b0b7b00d635337c1d57a09e31e69f943
784867/200000 cyc/op24527/20000 ns/op20000000/24527 ops/us11 B .text (5 insns)+ (1)aye::Peter+Omni(0+1)::aarch64 @ 432Hz
#56kleene_nand (THIS CAPSULE)
domain: smart-tree | id: 6af09389e8e9818028f479ec1700089e
403171/100000 cyc/op768283/400000 ns/op400000000/768283 ops/us11 B .text (5 insns)+ (1)aye::Hue+Gemini(0+1)::x86_64 @ 432Hz