.nornir/assets/catalog-key-zerocopy.svg
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="300" font-family="monospace" font-size="13">
<style>
.box{rx:6;ry:6;stroke-width:1.5}
.old{fill:#3a2323;stroke:#c0654f}
.new{fill:#233a2b;stroke:#4fae76}
.t{fill:#e8e4da}.dim{fill:#9a948a}.arr{stroke:#6fd3f5;stroke-width:1.5;fill:none;marker-end:url(#a)}
.hdr{fill:#e8e4da;font-size:14px;font-weight:bold}
</style>
<defs><marker id="a" markerWidth="9" markerHeight="9" refX="7" refY="3" orient="auto"><path d="M0,0 L7,3 L0,6 Z" fill="#6fd3f5"/></marker></defs>
<rect width="720" height="300" fill="#14110d"/>
<text x="16" y="26" class="hdr">skade catalog table_key — 2 allocs → 1 (byte-identical)</text>
<text x="16" y="58" class="dim">OLD — format! (2 allocs + Vec clone) ~513 ns/op</text>
<rect class="box old" x="16" y="70" width="150" height="46"/><text x="26" y="90" class="t">ns.clone()</text><text x="26" y="107" class="dim">Vec<String> copy</text>
<rect class="box old" x="196" y="70" width="150" height="46"/><text x="206" y="90" class="t">.join(".")</text><text x="206" y="107" class="dim">→ String #1</text>
<rect class="box old" x="376" y="70" width="180" height="46"/><text x="386" y="90" class="t">format!(cat SEP ns SEP name)</text><text x="386" y="107" class="dim">→ String #2</text>
<path class="arr" d="M166,93 L196,93"/><path class="arr" d="M346,93 L376,93"/>
<text x="16" y="168" class="dim">NEW — one pre-sized String, push by ref ~226 ns/op (~2.3×)</text>
<rect class="box new" x="16" y="180" width="200" height="46"/><text x="26" y="200" class="t">String::with_capacity</text><text x="26" y="217" class="dim">exact len, 1 alloc</text>
<rect class="box new" x="246" y="180" width="230" height="46"/><text x="256" y="200" class="t">push_str(cat) push(SEP)</text><text x="256" y="217" class="dim">for part in &[String]: push</text>
<rect class="box new" x="506" y="180" width="190" height="46"/><text x="516" y="200" class="t">push(SEP) push_str(name)</text><text x="516" y="217" class="dim">= same bytes</text>
<path class="arr" d="M216,203 L246,203"/><path class="arr" d="M476,203 L506,203"/>
<text x="16" y="270" class="dim">guard: table_key_is_byte_identical_to_legacy_format (always-on) · heavy runs → Loki/Odin</text>
</svg>