Search for a command to run...
The Nacre Array is a segmented dynamic array with three properties absentfrom conventional contiguous arrays: (1) per-element metadata headers that make elements selfdescribing without external bookkeeping, (2) a four-state thermal machine (Hot/Warm/Cold/Compressed)that allows cold segments to compress in place via LZ4 or Zstd while hot segments remain uncompressed and mutable, and (3) fracture planes at segment boundaries that enable structuralsplits without copying element payloads. These properties target a recurring constraint class:sequence workloads where structural mutation, selective compression, and low-cost partitioning matter more than uniform random-access throughput. Inspired by nacre (mother-of-pearl),where layered aragonite tablets bonded by organic biopolymer achieve roughly 3,000x the fracture resistance of the raw mineral Jackson et al. [1988], Barthelat et al. [2007], the structureorganizes elements into fixed-capacity segments with per-segment summaries and a tick-drivencooldown finite-state machine. The implementation evaluated here performs mutations locallywithin a segment, updates cumulative suffix metadata incrementally after insert/remove, splitscumulative metadata alongside segments instead of rebuilding both halves from scratch, andexposes an explicit reheat path for compressed segments through owned reads and mutableaccessors. Against Rust’s Vec on the Criterion harness used in this paper, Nacre splits 23.6xfaster than Vec::split_off at 100K elements and inserts 8.3x faster at the midpoint, whilepure random access is 8.1x slower at 100K with the segment cache disabled. A brief 100K pushwin over default-growth Vec persists, but push throughput is not treated here as a structuralNacre advantage because preallocated Vec remains faster. Mixed hot/cold memory-reductionclaims are deferred until a reproducible benchmark harness for that workload is checked into therepository. The paper positions Nacre as a specialized segmented-sequence primitive for workloads where these structural operations dominate, not as a blanket replacement for contiguousarrays.