Sparse Array

Noun · Development

Definitions

  1. An array in which most elements have the same default value (typically zero or undefined) and only the non-default entries are actually stored, using structures like hash maps or compressed row storage to save memory. Common in scientific computing, game engines (entity-component systems), and JavaScript (where deleting array elements creates holes).

    In plain English: An array that saves memory by only storing the entries that actually have values, skipping all the empty or zero slots.

    Example: "The 10-million-element matrix is 99.9% zeros, so we store it as a sparse array and use 1/1000th of the memory."

Related Terms