Best Use & Engineering Application Guide

Engineering Category: Spatial Indexing, Kinematics & Fixed-Point Geometry

Best Use in Production: Deterministic coordinate folding, space-filling curve locality mapping, and fixed-point trajectory kinematics without floating-point non-determinism.

When to Select This Capsule: Sole canonical implementation for its 64-vector functional equivalence class. Low-latency L1-resident kernel (3562473/200000 cyc/op); well-suited for high-frequency pipeline stages.

Snap-Circuit Wiring Role: 1-to-1 Unary Transform Stage `(i64)->i64` — snaps directly into linear pipelines or fan-out DAG branches.

Hardware _rdtsc: 3562473/200000 cycles/op
Latency: 1187491/200000 ns/op
Throughput: 200000000/1187491 ops/us
Compiled ELF64 .text: 86 B (17 x86_64 insns)
C64 64KB RAM Budget: 145/32768 (290 B source)
Ternary Vote: + (score 1) | Salience: 1900/21
Pure-Rust Capsule Source Code (290 B)
pub fn borg_zig_vaked_spiral_step(coord: i64) -> i64 {
    let x = (coord & 0xFFFF) - 32768;
    let y = ((coord >> 16) & 0xFFFF) - 32768;
    let nx = ((x * 196 - y * 165) >> 8).wrapping_add(432);
    let ny = ((x * 165 + y * 196) >> 8).wrapping_sub(216);
    (nx ^ 137).wrapping_add(ny)
}
rustc -C opt-level=3 x86_64 Disassembly (86 B .text / 17 insns)
borg_zig_vaked_spiral_step:
    movzx    eax, di
    add    rax, -32768
    shr    edi, 16
    add    rdi, -32768
    imul    rcx, rax, 196
    imul    rdx, rdi, -165
    add    rdx, rcx
    sar    rdx, 8
    add    rdx, 432
    imul    rax, rax, 165
    imul    rcx, rdi, 196
    add    rcx, rax
    sar    rcx, 8
    xor    rdx, 137
    lea    rax, [rcx + rdx]
    add    rax, -216
    ret

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

Global RankCapsule & DomainHardware _rdtscLatencyThroughputELF .textTernary VoteAuthor Aye
#1574borg_zig_vaked_spiral_step (THIS CAPSULE)
domain: geometry | id: aea8564606329ce3d98d058f54db6784
3562473/200000 cyc/op1187491/200000 ns/op200000000/1187491 ops/us86 B .text (17 insns)+ (1)aye-a6000-prime @ 432Hz