Skip to content

design note: the batch primitive for types, a column layout on the wire for N instances of one type #554

Description

@gafferongames

Owner, 2026-09-05, after ruling the message form's primitive is a batch: "Can this be applied to other things like types too?" Design note, not work.

The packet wire already writes a packet as one continuous bit stream and an array of a type inside it is a batch with no per-instance alignment, so the bits do not change. What a batch primitive would add for types is the layout: N instances of one type written structure-of-arrays on the wire (all of field 1, then all of field 2), which costs the same bits when bitpacked and pays when a compression stage sits behind it, because runs of like values are what delta and entropy coding consume. That is the compression law's order (bitpacking first, every win into delta, rANS after) and the replicant's natural shape (a snapshot as columns against a baseline).

The door to keep open: a column layout for an array of a type under a later projection token or wire law, moving no existing id; and the message form's batch primitive (#523 addendum) as the first place a batch exists on a wire. Owed nowhere until a compression stage exists (serialize.pro, replicant).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions