Splinter is a passive, lock-free shared memory substrate for high-frequency vector and KV ingestion across disjointed runtimes. It puts inference and governance in the same memory lane as the model. No daemon. No socket tax. No memcpy.
The entire core — every seqlock, every atomic op, every alignment guarantee — lives in two files. splinter.c and splinter.h. Under 1,100 lines combined. Every public function has inline Doxygen. No separate reference manual needed.
The full repo, including CLI tooling, stress tests, all language bindings, and the llama.cpp inference shard? Just over 6,000 lines.
// if it fits in your head, it fits in your L1 cache
Splinter is a memory-mapped region, not a process. It has no event loop, no background threads, no arbiter to wake up. Readers and writers share the same physical RAM directly through the OS page cache.
Concurrent access is coordinated with atomic sequence epochs per slot. If two writers race on the same key, the slower one gets EAGAIN and retries. No thread ever sleeps waiting for a lock to release.
Data is never serialized across a socket boundary. Readers cast a raw pointer directly to the L3 cache slot. TypeScript, Python, Rust, and C can all reference the same embedding without a single memcpy().
Splinter includes a full-featured namespaced KV store, with tandem slot, bloom filter and feature flags for added convenience.
Vectors are first-class 768-dimensional embeddings, retrievable by managed pointer and epoch access, and easily computed by the included sidecar-style inference engine.
INCR, DECR, OR, XOR, AND, NOT as well as simple ephemeral text caching works just like it does in other cache stores, just a LOT faster.
Slots are pre-allocated at store creation. No heap fragmentation. No GC pauses. No garbage. The kernel maps the entire region into every process address space at once — getting a value costs one pointer dereference.
Writers increment a per-slot epoch before and after writing. Readers detect torn reads by checking the epoch changed mid-read and simply retry. No mutex contention, no priority inversion, no convoy problem.
64-byte alignment means each slot maps to exactly one cache line. Two writers never cause false sharing on adjacent slots, even at 3M+ ops/sec on throttled consumer hardware.
| substrate | ops/sec | cycles/op | daemon | memcpy | |
|---|---|---|---|---|---|
| SQLite / Redis | ~130,000 | ~23,076 | yes | yes | |
| Splinter (standard) | 3,200,000+ | ~937 | no | no | |
| Splinter (NUMA-pinned, projected) | 10,000,000+ | <300 | no | no |
// 25x faster than Redis on the same throttled hardware. not a fair competition — Splinter is local IPC only. but sometimes you just need a piccolo, not an orchestra.