Zinc’s fundamental advantage is that there is no data transfer. Two processes reading and writing the same physical memory incur no serialization cost, no copy cost, and no kernel round-trip for the data itself. The only kernel interactions are the initialDocumentation Index
Fetch the complete documentation index at: https://mine-27913f41.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
mmap setup and the optional futex call in notify/wait.
Notify/wait latency
The notify/wait roundtrip measures the time from a writer callingnotify() to a reader returning from wait(). This is the synchronization overhead, not the data access cost.
| Platform | P50 | P99 | Measurement method |
|---|---|---|---|
| Linux (futex) | < 1 microsecond | < 3 microseconds | criterion on AMD EPYC |
| macOS (spin loop) | ~2 microseconds | ~10 microseconds | criterion on Apple M2 Pro |
Data access throughput
Once the region is mapped, data access is memory-bound, not Zinc-bound. Reading or writing the shared region is equivalent to reading or writing any other memory-mapped region in the process.| Operation | 100MB region | 1GB region |
|---|---|---|
| Sequential read | ~200 microseconds | ~2 milliseconds |
| Sequential write | ~200 microseconds | ~2 milliseconds |
| Random read (4KB stride) | ~5 milliseconds | ~50 milliseconds |
Zero-copy verification
To verify that no copying occurs, compare pointer addresses across adapters:Comparison to alternatives
Unix sockets. For a 100MB transfer over a Unix domain socket, the data is copied twice (from sender to kernel, from kernel to receiver). Throughput on a typical system is roughly 1-2 GB/s. Zinc eliminates both copies. For small messages under 1KB, sockets can be faster because there is no setup overhead. gRPC (localhost). gRPC serializes data to protobuf, copies through HTTP/2 framing, sends over a TCP socket, and deserializes. For a 100MB tensor, serialization alone takes 10-30 milliseconds. Zinc’s zero-copy path takes 0 milliseconds because no bytes are moved. Redis. Redis is a network service. Data goes through the client library, through the kernel’s network stack, into Redis’s memory, and back. Useful for data that needs to be shared between machines. For same-machine sharing, the overhead is unnecessary. mmap files. Rawshm_open + mmap + ftruncate uses the exact same kernel primitives as Zinc. Throughput is identical — both are memory-bandwidth-bound. Any measurement variance between them is OS scheduling noise (CPU frequency scaling, thread placement), not a code-path difference. The difference is lifecycle: Zinc handles creation, naming, reference counting, and cleanup automatically. With raw mmap, you must manage file creation, sizing, and cleanup yourself. Zinc’s regions are anonymous (backed by shm_open, not a visible file) and self-cleaning.
Plasma (Ray). Deprecated. Formerly a shared memory object store with a client-server architecture. Zinc has no server — memory is shared directly between processes with no intermediary.
Run the throughput examples above to measure each alternative against Zinc on your hardware.
Benchmark methodology
Each example uses the same statistically rigorous approach to isolate true throughput from system noise.Min-time (max GB/s) across multiple samples
Noise sources — CPU frequency scaling, thermal throttling, OS scheduler interrupts, TLB pressure — only ever slow things down, never speed them up. The fastest observed run is therefore the run with the least noise, closest to the true hardware limit. This is the industry standard, used by Criterion.rs and Google Benchmark. Taking the average would encode noise — a single context-switch spike inflates the mean.Alternating order
At each payload size, 5 independent samples are collected. Odd-numbered samples run Zinc first, then the alternative. Even-numbered samples run the alternative first, then Zinc. This cancels first-run bias (cold pages, cold kernel caches).Warmup phase
Before each timed measurement, 10% of the full iteration count is run as unmeasured warmup. This faults in physical pages, primes the TLB, and stabilizes CPU frequency before timing begins.Page-aligned data
Zinc reserves the full first page of the shared memory region for the header. The data region (as_ptr()) starts at a page boundary:
Page-aligned data lets CPU write-combining buffers and L1 streaming prefetch operate at full bandwidth. Without this, memset crossing a page boundary on every write cycle incurs a measurable throughput penalty at small payloads.
Throughput examples
Standalone comparison benchmarks live incore/examples/. Each measures Zinc against an alternative for the same workload and prints a throughput table.
Zinc vs Unix sockets

Zinc vs raw mmap
shm_open + mmap + ftruncate with manual futex synchronization. Throughput is identical — both use the same kernel primitives. Any deviation from ratio 1.00 is OS scheduling noise, not a Zinc overhead. The raw path requires explicit lifecycle management: shm_open, ftruncate, mmap, shm_unlink, and manual notify/wait via futex. Zinc adds automatic creation, reference counting, and cleanup on drop.

Zinc vs gRPC

Zinc vs Redis
127.0.0.1:6379. Shows network-stack overhead even on loopback — data goes through client library → kernel TCP → Redis process → and back.

Results shown above were measured on a MacBook Pro with Apple M2 Pro chip, 16 GB RAM, and macOS Tahoe 26.5. Performance will vary across platforms, see the benchmark methodology section for details on measurement approach.
Benchmarks
Benchmarks are not yet available. They will live incore/benches/ and use criterion for statistical measurement. Once added, they’ll be run with:
Allocation-free hot path
Thezinc_ptr, zinc_capacity, zinc_notify, and zinc_wait functions perform no heap allocation. The hot path is lock-free and allocation-free. We verified this with dhat (a heap profiling tool). Zero allocations in these functions across 1 million iterations.