Skip to main content

Crate znippy_zoomies

Crate znippy_zoomies 

Source
Expand description

znippy-zoomies — fast-as-hell building blocks extracted from katana-osm.

  • xml: generic VTD-style parallel XML element scanner (tag-vocabulary agnostic) — the scanning machinery vtd is now layered on top of.
  • vtd: VTD-style parallel OSM-XML scanner producing a compact ElemIndex (byte offsets into the file), plus zone-map summaries and byte-level attr parsers.
  • stree: Ragnar Groot Koerkamp’s static search tree over sorted i64 keys (AVX2), including an mmap-backed variant whose leaf layer IS the sorted file.
  • stree32: a clean clone of stree restored to Ragnar’s ORIGINAL u32 key width (B=16, _mm256_cmpgt_epi32) for future non-OSM use. A separate concrete type, never a generic STree<T> (the i64 path stays for OSM/skade).
  • chunk_revolver: zero-allocation slot pool for 1-reader / N-worker streaming.
  • gatling: generic no-barrier worker-pool engine (split → N decode → in-order collect → sink), parameterised by a gatling::Codec + gatling::Sink. Its gatling::io submodule is the async sibling — a no-barrier, bounded, ordered async task pool for I/O-bound (network/PUT/GET) fan-out, same philosophy, tokio substrate instead of OS threads.
  • psort: parallel sample sort (and reference LSD radix) over 16-byte AoS records keyed by their leading i64.
  • gatling_sort: generic parallel comparison sort (gatling_sort_by stable / gatling_sort_unstable_by / gatling_sort), a merge sort fanned out on the gatling fork-join — the drop-in parallel slice::sort_by.
  • gatling_bfs: frontier-parallel BFS (gatling_bfs / gatling_bfs_reachable) over a generic node -> neighbors graph — expands each BFS level in parallel on the fork-join pool, merges the visited-set dedup at the level barrier.
  • json: zero-copy parallel NDJSON record scanner (the vtd pattern for JSON) — memchr newline split is safe by RFC 8259, plus an escape-aware top-level find_key field probe.
  • vann: pure vector-ANN engine — an exact brute-force (“flat”) f32 nearest-neighbour index (100%-recall oracle) with runtime-detected SIMD + int8/VNNI cosine kernels. Extracted from nornir.

Modules§

background
Single background job — the one-worker degenerate of the gatling pool.
chunk_revolver
Backwards-compatible alias for the slot pool, now folded in as gatling::revolver. Preserves the historical gatling::chunk_revolver (and, through the znippy-zoomies re-export, znippy_zoomies::chunk_revolver) path for external consumers. Zero-allocation slot pool variant — the buffer substrate the streaming run/run_typed engine fans over: one reader fills pre-allocated fixed-size slots, N workers borrow each as &[u8] (zero-copy) via revolver::get_chunk_slice. Folded in from the former top-level chunk_revolver module (still re-exported crate-root as chunk_revolver for API compatibility). See revolver. Zero-allocation slot pool for 1-reader / N-worker streaming pipelines.
gatling
Gatling — generic no-barrier worker-pool streaming engine.
gatling_bfs
Gatling (frontier-parallel BFS) — a breadth-first graph walk whose per-level neighbor expansion fans out across the no-barrier gatling pool.
gatling_forkjoin
Gatling (fork-join) — the no-barrier worker pool for work known upfront.
gatling_map
The PARKED pool — workers that live on the cores and pick up work, for the same shaped job run over and over.
gatling_sort
Gatling parallel sort — the sort primitive the constellation was missing.
json
Parallel NDJSON (JSON-Lines) scanner — the vtd pattern applied to newline-delimited JSON.
psort
psort — parallel sort building blocks extracted from katana-osm.
stree
S-tree static search index for sorted i64 keys.
stree32
S-tree static search index for sorted u32 keys — Ragnar’s ORIGINAL width.
stree32_range
S-tree range index over sorted u32 ranges — Ragnar’s third width/use.
stree512
S-tree over sorted i64 keys with B = 16 and AVX-512 node compares — the “third variant” hypothesis from the 2026-08-10 ragnar brief.
stree_hi32
Hi32-routing S-tree: u32 high-half internal nodes over an i64 leaf column — the fanout-17 geometry without the two-cache-line node.
stree_log
A payload-carrying version log over stree::STree64: exact (at_exact), point-in-time (as_of, the floor/predecessor) and replay-cut (boundary_leq) queries over an append-only, ascending-i64-keyed log.
stree_simd
One binary, both machines — the stree family’s one-time SIMD capability resolution (stree_simd::path), plus the ZNIPPY_STREE_SIMD / stree_simd::force A/B knob. Every stree entry point branches on the resolved value; nothing calls is_x86_feature_detected! on a hot path. One-time SIMD capability resolution for the whole stree family.
vann
vann — a self-contained vector-ANN engine: an exact brute-force (“flat”) nearest-neighbour index over f32 vectors (the 100%-recall ORACLE) and the runtime-detected SIMD + int8/VNNI cosine kernels it scores with.
vtd
VTD-style index for OSM XML files — the OSM specialization of the generic parallel XML scanner in crate::xml.
vtd_single_pass
Single-pass “discard-until-boundary-then-store” streaming VTD (the owner’s idea).
xml
Generic VTD-style parallel XML element scanner.

Functions§

functional_status
Introspection / emit marker — record one functional-status row for the nornir test matrix. Wraps nornir_testmatrix::functional_status behind the testmatrix feature (a compiled-out #[inline] no-op otherwise, with no nornir dep in the default build). component is the reporting surface (e.g. "gatling_forkjoin"), check what it verified, ok the verdict, detail a short human note. Mirrors the korp-collectors reference wiring so nornir test --features testmatrix SEES each gatling run.