HeapMeasure type HeapMeasure
import {DEFAULT_HEAP_MEASURE} from '@ryanatkn/syntax-highlighter-bench/heap_matrix.js'; The measure shown by default: the sum, which is what is ranked.
The retained-heap tables: what each library holds once one language is loaded and highlighted once, as a row for each language. A file states three numbers for each (BenchHeap): the V8 heap less machine code, the machine code, where compiled regular expressions live, and the external memory beside it, where a WebAssembly engine keeps its linear memory. Four groups show them: the three summed, which is what a consumer pays and so is ranked first, then each on its own.
6 declarations
HeapMeasure type HeapMeasure
import {DEFAULT_HEAP_MEASURE} from '@ryanatkn/syntax-highlighter-bench/heap_matrix.js'; The measure shown by default: the sum, which is what is ranked.
readonly { id: HeapMeasure; label: string; note: string; compared: boolean; }[] import {HEAP_MEASURES} from '@ryanatkn/syntax-highlighter-bench/heap_matrix.js'; Every measure, in display order, with its label and whether its rows are compared.
HeapMeasure type "total" | "retained" | "code" | "external"
import type {HeapMeasure} from '@ryanatkn/syntax-highlighter-bench/heap_matrix.js'; A number of a retained heap, or the three summed.
(results: Pick<MatrixResults, "heap">): boolean import {results_have_heap} from '@ryanatkn/syntax-highlighter-bench/heap_matrix.js'; Whether a file holds any retained heap.
resultsPick<MatrixResults, "heap">boolean (values: readonly number[]): number | null import {to_heap_floor} from '@ryanatkn/syntax-highlighter-bench/heap_matrix.js'; The noise floor of a heap row, as a ratio's deviation: the tolerance two readings are compared within, HEAP_TOLERANCE_KB or HEAP_TOLERANCE_RATIO, whichever is larger, taken against the smallest number in the row.
valuesthe row's numbers, in bytes
readonly number[]number | null
the floor, or null for a row with no positive number
(results: MatrixResults, selection: { langs: readonly string[]; parts: readonly string[]; }): MatrixGroup[] import {to_heap_groups} from '@ryanatkn/syntax-highlighter-bench/heap_matrix.js'; The selected languages as rows, in the file's order, once for each selected measure. A library that doesn't claim a language is unsupported there, and one that claims it with no reading, as in a run filtered to other libraries, is unmeasured.
resultsselection{ langs: readonly string[]; parts: readonly string[]; }the groups, none for a file with no retained heap