"gzip" import {HEADLINE_COMPRESSION} from '@ryanatkn/syntax-highlighter-bench/headline.js'; The compression the headline bundle sizes are shown in.
The headline figures of the landing page, each drawn as bars, and the table of what each language costs in a bundle: read from a results file by the same functions the results page uses.
8 declarations
"gzip" import {HEADLINE_COMPRESSION} from '@ryanatkn/syntax-highlighter-bench/headline.js'; The compression the headline bundle sizes are shown in.
HeadlineChart import type {HeadlineChart} from '@ryanatkn/syntax-highlighter-bench/headline.js'; A headline figure drawn as bars, with what its heading says.
rowtype MatrixRow
titletype string
notetype string
detailsWhether each bar shows its number's details beneath it.
type boolean
10000 import {PRACTICE_BLOCK_BYTES} from '@ryanatkn/syntax-highlighter-bench/headline.js'; The size of the code block the practical figures are worked out for, in bytes.
1000000 import {PRACTICE_BUILD_BYTES} from '@ryanatkn/syntax-highlighter-bench/headline.js'; The source a site build might highlight, in bytes.
16 import {PRACTICE_FRAME_MS} from '@ryanatkn/syntax-highlighter-bench/headline.js'; One frame at 60 frames a second, the budget an editor highlighting as you type works in.
(results: MatrixResults): HeadlineChart[] import {to_headline_charts} from '@ryanatkn/syntax-highlighter-bench/headline.js'; The headline figures, each drawn as bars: geometric-mean throughput over the neutral inputs for each mode, the time to a first highlight from a cold start, the retained memory over the languages, everything a page loads over the documentation set with what it is made of, and that set's JS alone. Only the throughput rows carry the run's noise floor, which was calibrated on the timed cells. A figure the file holds no number for is left out, so a file with no timed run draws only its deterministic figures.
results(results: MatrixResults): MatrixGroup[] import {to_language_weight_groups} from '@ryanatkn/syntax-highlighter-bench/headline.js'; What each language's grammar adds to a library's JS: the floor, the library with no language, then each language alone less that floor, every one minified and compressed with HEADLINE_COMPRESSION.
resultsthe groups, none for a file that measured no bundle
(results: MatrixResults): MatrixGroup | null import {to_practice_group} from '@ryanatkn/syntax-highlighter-bench/headline.js'; The HTML throughput worked out for sizes a reader knows: the time to highlight one block, how many blocks fit in one frame, and the time for a build's worth of source. Each is the geometric-mean rate over the neutral inputs applied to that size, so it is an estimate, and it carries the geomean's noise floor, since every ratio in it is the rate's own.
resultsMatrixGroup | null
the group, or null for a file with no timed throughput