Skip to content

Edit: rest in a paragraph for an edit on the line after its last - #518

Merged
DongyuZhao merged 298 commits into
mainfrom
claude/project-thread-raxrtq
Nov 16, 2026
Merged

DongyuZhao merged 298 commits into
mainfrom
claude/project-thread-raxrtq

Conversation

@DongyuZhao

Copy link
Copy Markdown
Contributor

First step of the no-flush plan: edits must be as cheap as appends. This step removes a length-dependent cost from typing at the end of a long paragraph.

Problem

Take an edit on the line right after a paragraph's last line, such as typing the first character of a new line at the end of a paragraph. session_rest placed its rest point at the paragraph's start, and the leap (THE LEAP / THE SEAMS) never ran, so the whole paragraph was read again. With token-sized edits, about 2% of the steps paid for the whole paragraph, so the average cost per edit grew with the paragraph's length.

Change

When the edited line directly follows a root child's last line and that child is a paragraph, the edit rests inside the paragraph through session_literal, starting from the paragraph's last line. The reading then decides whether the edited line continues the paragraph.

The rest point is the last line, not the edited line itself, because the paragraph's content has no line after its last one for the leap to cut at.

Numbers

Typing a document at its end with 1–12 byte edits on a flushed session. Local gcc 13 release build, Ir in the edit calls, per edit:

Shape Before After
100-line paragraph, emphasis 110.7k 75.6k
200-line paragraph, emphasis 180.0k 75.9k
100-line paragraph, plain 35.1k 25.9k
200-line paragraph, plain 44.3k 26.6k

The average reread per edit is now 21–26 bytes at both lengths. Before, it was 62–134 bytes and grew with the paragraph.

Testing

  • Full debug suite: 151/151 passed, including every incremental family and the fuzz oracle.
  • An earlier attempt rested on the edited line itself. That attempt tripped S_leap_ready's assertion in incremental_random_1 and incremental_fuzz, which is why this version rests on the last line.
  • Only the root level is covered. A paragraph nested in a block (session_rest_in) still rests before it; that is a follow-up.

Generated by Claude Code

claude added 30 commits October 29, 2026 09:58
Nothing reads a published node's place again: the old children an edit
keeps or takes back are measured from where the child before the old
tail ends, by their extents, for the reading's candidates, its splice,
its records and its publish, so the splice no longer walks the tail to
move the places.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The FINAL prefix's edit check made GCC 15 stop inlining
publish_relation_begin into publish_matched, a per-step cost on the
stream session path. It is always inlined now, as its neighbours are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The widths and the reread range are made at a session's first edit, so a
session that is only streamed keeps the size it had: the 32 bytes they
added moved the session into another malloc size class, and the heap's
layout after it, which cost some stream windows 3%.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…, stage 1)

## What

Before this change, an edit inside a list item, callout or footnote
reread the whole root child that held it: one edit near the end of a
long list read the entire list again. Now the reading starts at a rest
point inside that container, at any depth. It reopens the chain of
containers from the root's child down to the rest point. Then it reads
on from there until the top-level resync (E1a) takes the old blocks
back.

Plan: `e1b-nested.md`, stage E1b-1. Resync and splice at depth is the
next stage.

## How

- **Nested rest point** (`session_rest_in`, session.c). The search
  descends while the held child is a container whose element sets
  `reopens` and the edited line is past its first line. At each level it
  picks the last child that:
  - begins after a blank (or prefix-only) line;
  - has a gap before its previous sibling, so no lazy line or split
    reference paragraph runs into it;
  - has no reading that started before the chain spanning its start.
  Child windows come from `markdown_core_node_window`.
- **Reopen the chain** (`S_reopen_chain`, blocks.c). Each chain node
  goes OPEN again, and its kept children are folded again. The new
  `reopen_block` hook lets an element undo what its close decided. Here
  that is the list's looseness. The engine still names no kinds: the
  hook and the `reopens` flag come from the elements. Elements opt in
  with `reopens`: list, callout, footnote and specimen. Tables are left
  out.
- **The blank state before the rest point** (`markdown_core_parser_rest_blank`).
  It tells each chain level whether the line before the rest point was
  blank to it, so the deepest node's last-line-blank flag matches a
  fresh parse.
- **The reach log.** It keeps each entry's raw end and builds a separate
  prefix maximum (`furthest`) for the span queries. This lets the root
  chain node's own close entry be found and dropped at reopen (it closes
  again where the reading closes it). `markdown_core_parser_spanned_inside`
  finds readings that start inside the chain.
- **Publish** (ast.c). Each chain node is recorded as open under its
  owner, with its kept children FINAL. Definitions in a chain node keep
  their place in the table (`publish_chain_rank`), so nested footnotes
  list in source order.

Hot paths are unchanged. Everything new runs at edit time or behind
`edit->depth`.

## Results

- The differential fuzz compares against a fresh `Document.parse`:
  20,000 container-heavy documents × 20 edits, plus 10,000 mixed ones.
  All match. The rest points it hit were at depths 1 to 4.
- Bytes reread per edit over `specs/incremental`, before → after:
  - list-ascii-16k: 11,694 → 5,833.
  - list-utf8-16k: 12,125 → 6,196.
  - Every other family is the same or lower. The whole set averages
    10,719 → 10,466.
- The incremental oracle suites and the api_incremental tests pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
- A container with one child (a one-item list, a quote holding one list)
  is now descended too: the search needs a child to go into, not two.
- A reopened root child closed by its own end condition (a directive's
  closer) notes its close at its last line, as one the input's end
  closes does, so that entry is the chain's own close too.
- Definition lists and directives reopen (`reopens`), as the plan's
  E1b-1 lists them. A definition's body is not published and has no
  window, so no rest point is looked for below one.

Bytes reread per edit over specs/incremental: quote-16k 15.9k -> 10.8k,
opener-directive-16k 16.3k -> 10.3k, nameless-directives 213 -> 164; the
whole set 10,466 -> 9,891 (main: 10,719).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…pth (step E1b, stage 2)

A reading reopened inside a container now resyncs at the child the chain
let go, at any level, and splices the rest of the old children back: each
block of the chain closes as it closed before, with the flags its children
fold refolded. Lists whose items abut (`abuts`) rest and resync between
adjacent items and at their first item. `trailed` becomes per-kind
(`trailed_kinds`), so list items no longer block a resync. The `hard`
incremental family now runs on the session subject.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The engine names no element kinds: the lookahead that tells the line
leaves the block open inside the chain block asks for a child of the kind
that block already holds, not for a paragraph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The reopen kept the content marks whose source fell before the rest
point, but marks read inside a nested block hold sources relative to that
block, so they never compared past it: a nested list read again on every
edit grew line_marks without bound (22 MB after 2000 edits of the 16k
list fixture, 11x a fresh parse). Every map the flush made is complete, so
the reopen now truncates to the identity run.

The fuzz runner reads each input twice: once as appends, as before, and
once switching to edits at the first head byte with the high bit set, so
the edit oracle sees random inputs too. Edits whose ends fall after a
continuation byte at a line start are skipped, since such positions are
ambiguous in UTF-16.

An api test makes a thousand edits to a small nested list and checks the
session holds no more than after the first hundred; it fails without the
fix (4x growth).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
… part 2)

The compaction of plan 12.4 (E-D4). The pool keeps the slots each reading
lets go for the next, so it holds what the most text the session held
needed. The session keeps that peak, and an edit that leaves less than
half of it reads the whole text: it drops the pool's released slots and
slab first, so the new nodes take new slabs, and again after, so the old
slabs go with the old nodes. The input's lines, the content marks, the
line facts and the edit's scratch then shrink to the text
(markdown_core_parser_compact, markdown_core_array_shrink). Ids stay, as
for any whole reading.

On the 16k list fixture an edit that deletes 90% of the text now leaves
1.35x the storage of a fresh parse, down from 7.6x. An api test checks
2x after such an edit, and fails without the compaction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Three cases where a snapshot settled what a longer input reads otherwise,
found by the edit-aware fuzz runner (4.6, then 4.1 at the flush):

- A `$` pair whose body a code span begins makes no formula, but the
  pairing still took the delimiters between its two away, so a reading
  from a settle point between them paired a `*` the whole reading drops.
  The rejected pair now holds the run undecided from its opener
  (markdown_core_inline_state_undecide).
- An attribute block whose quote the input's end leaves open, or closes
  at the very end, reads that quote as an unquoted value's byte; the
  input going on undoes it. The recogniser now says it ran out
  (`ran_out`), and the run reports the end read as it does for a block
  that does not close.
- A topic's name reads the character after it whole, up to four bytes,
  but reported an end read only within three of the end. It now reports
  within four, and five after a `/`.

Each case is a source of session_flush_matches_a_parse, which fails
without its fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…t openers

A formula scanner asks how many `$` openers are unmatched to read a `$` as
a closer. An opener that an emphasis pair around it takes away still counted
at those scans, so a reading from past the emphasis, without the opener,
could read a later `$` as an opener instead. The core now notes the rules
whose scanners ask that count, and the start of a removed opener of such a
rule is an undecided start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The wire's markdown_core_wire_session_edit answers an edit's document as a
step's message. Swift's MarkdownSession.edit(from:to:with:), and Kotlin's
and ECMAScript's edit(start, end, text), replace the text between two
cursors in the session's unit and return the parse of the new text. An edit
before the flush throws the new code sessionStreaming (SESSION_STREAMING);
one out of bounds or backwards throws outOfBounds and leaves the context.

Each binding sweeps an insertion and its undo over every cursor of a text
and checks each document against a fresh parse, and checks that a node the
edit did not reach is the old node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Document.content holds existential markup, which == cannot compare.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…step E3)

didOpen parses the text into the document's session and flushes it, each
didChange content change is one session edit, and completion locates the
session at its cursor. The server holds no copy of the text: the new
markdown_core_session_source lends the session's. A change whose scope is
backwards is refused before any edit applies; an edit that cannot allocate
closes the document. The sync oracle now compares the session's document
with a fresh parse of its text after every change.

Reading the session's exact-sized text showed a context query reading one
byte past the text at a destination the text's end opens, such as `[a](`;
it now reads only the text, with a facade test on an exact-sized buffer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…p 4b)

MarkdownCoreLSP.Server wraps markdown-core-lsp: initialize, shutdown,
phase, open, update, close and complete, with the protocol's Position,
Scope and Change, Capabilities, Completions and ServerError. The C engine
builds from source as the MarkdownCoreLSPC target. The conformance tests
replay specs/lsp/transcripts through the server, bundled by the resource
plugin, and the release manifest, source archive and product build carry
the second product.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Kotlin's com.nouprax.markdown.core.lsp.Server and the ECMAScript entry
point @nouprax/es-markdown-core/lsp join MarkdownCoreLSP.Server: one
method per protocol method of markdown-core-lsp, with Position, Scope,
Edit, Capabilities, Completions and an error carrying the protocol's
code. Kotlin's JNI library and cinterop definition link the engine, whose
natives register on the parser's JNI holder; the WebAssembly module
compiles and exports it. A content change is now an Edit in Swift too,
by the naming rule.

Each binding's tests replay specs/lsp/transcripts in process: Kotlin
from a generated common-test source, ECMAScript from the bundled
conformance fixtures. The source-list and public-surface audits, the
JVM surface record, the ABI dumps and the npm packaging test know the
new sources and entry point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…given hash

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
A heading's node keeps its base (the projection of its text, split after
an edit that leaps inside it) and a numeric suffix; its anchor is the base
and "-k". One naming model serves every length: the committed pass and
an edit's renames read names as pieces and compare them byte for byte,
keyed by their measure, so there is no 1024-byte cut and no digest key.

- Stems keep no bytes, only a measure and a witness (first member's base,
  else a child's, else the heir or relic), and are removed by id.
- An edit's new bases wait for the edit's end and are written in place
  (the old base's kept front and back around the new middle).
- The public anchor borrows the base when it is whole and unsuffixed, and
  is otherwise joined on first read.
- A heading whose text projects to nothing borrows a static "section".
- Roster ANCHOR keys are hashed by measure.

Also fixes a locate crash present before this change: a heading's run that
reached the text's end, prepared before a later heading's run began, lost
the sink root and read NULL when it finished. Only a run that reaches the
end now replaces the root.

The OOM dump sweep parses a fresh document per allocation, since a read
keeps the anchors it joins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…ader refuse

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…names as bytes

The measure is now a polynomial in a generator G of the residues modulo
2^61 - 1, read through byte tables, so no repeating pattern of byte changes
cancels; the Codex family of colliding headings no longer shares a measure.
The committed naming pass, which reads every base whole, files names under a
byte hash read in parts (markdown_core_key_stream), so a base's hash is read
once for all its suffixes; edits keep the measure. Holders whose bases are of
the name's base size are compared by suffix and one comparison of bases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…enerator

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…er for every heading

Swapping the projection's storage into the node left the pass a buffer to
grow again from nothing for the next heading, several reallocations per
heading; a copy is one allocation, as the joined anchor was before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
core/tree.{h,c} is one B+ tree of fixed-size entries (leaves of 64,
fanout 16) with a focus that splits it into a front in new text terms
and a back in old text terms, pending shifts, optional end measures
(tree_past), key ordering for label trees, and handles kept current by
a `moved` callback. It replaces the zipper and every hand-rolled index:

- input lines (facts dropped as lines move to the back), reach, uses
- committed tables (listed entries by id -> handle) and their labels
- roster places (record id -> handle)
- headings and heading-name stems
- session child widths
- the label key tree (map.c)

core/zipper.h is gone. Document reads use the pure tree_peek and
tree_seek, so concurrent read-only access stays safe.

The stream driver keeps its per-line cost within the stage gate: leaves
are not zeroed, the next line's start is read from the terminator, an
edit's line insert is a cold path, properties walk lines in runs
(tree_run), and a new child takes its offset from the line at hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
An edit's splice cut, shifted and unlabeled one table at a time, so a
reference definition whose label fell to a later heading looked the
heading up in old-text terms and lost the label. Take and shift every
table first, then move the labels on. A sweep of whole-line edits over
texts whose labels cross tables checks the trees and tables against a
fresh parse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Headings prepare runs its loop only when a heading waits, a tree of one
leaf erases in that leaf, and an erase of nothing returns inline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
An insertion that joins the front at the end appends in place, a cut of
the last leaf's tail leaves the leaf and lowers only the counts above it,
a one-leaf tree inserts in its leaf, a label table looks a label up once,
and headings in order are read from their stretch of storage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The first leaf of a tree starts at eight entries and doubles to a full
leaf while it is the only one, taken anew and copied so small blocks come
from the allocator's caches. Definition tables search the leaf of the
front's last entry directly, the uses flush walks runs, and withdraw skips
tables whose front ends before the root.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
A first leaf that grows from eight entries costs every small document
its growth in the parse stage; the leaf is taken at its full size, as
before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Line places, the dropped facts and a leap's places step through the line
records leaf by leaf, forward with markdown_core_tree_run and back with
the new markdown_core_tree_back, instead of finding each line by rank.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The snapshot and the locate's look begin, read and end through the same
S_look_begin, S_look_read and S_look_end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
record_nest records the nodes of a reopened definition's old bodies, and
each record owns its node from then on; the body itself was never
released. Two edits of a definition list that drop a body (a blank line
removed before a term, then put back) left its node, and its slab, alive
past the session's close.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
A session that still streams, and a document, locate through a session of
their whole text, flushed, whose look reads at the cursor (THE LOOK OF A
TEXT AS A WHOLE): the parse of the text before the cursor, with labels
seeded from the whole document, is gone, and context_at always has a
locus. A flushed session with an empty root reads its look with no window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
An edit on the line right after a paragraph's last line -- typing the
first character of a new line at the paragraph's end -- rested at the
paragraph's start and read it again whole, so every new line of a long
paragraph cost as much as the paragraph. The edit now rests in the
paragraph from its last line (THE LEAP), as an edit of one of its own
lines does, and the reading decides whether the edited line goes on with
it. Typing at the end of a 200-line paragraph: 180k -> 76k Ir per edit,
the same as at 100 lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
@DongyuZhao
DongyuZhao requested a review from a team November 16, 2026 13:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T13:34:51.520943Z 5a36db7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

Benchmark

Commit: 5a36db70794d17f8002b2c40ce79fe81013e5958 · CI run · CI status: success

Run and full reports.

Benchmark is required when CI inputs require execution. This ordinary PR comment does not create a review thread to resolve.

Parse stages

Baseline: 94b9172c10d550ad3114ea8db6e4a90094c9e7e8. 792 document workloads, measured in the same job.

Core instructions (Ir) Base PR PR / base
Source → buffer 61,731,375 61,731,375 1.0000×
Buffer → AST 225,056,798 225,056,798 1.0000×
Both stages 286,788,173 286,788,173 1.0000×
Both stages, ASCII documents 142,941,144 142,941,144 1.0000×
Both stages, UTF-8 documents 143,847,029 143,847,029 1.0000×

Totals sum this finite workload; they are not elapsed time or a general speedup claim. Parser creation and release are not parsing and are in no figure here.

Stage budget (+2% per document and stage): 1,584/1,584 passed, 0 exceeded. Required when CI inputs require execution.

Largest stage ratios (up to 10 document stages)
Case Stage Base Ir PR Ir PR / base
alpha-list-paired-dialect Source → buffer 235,539 235,539 1.0000×
alpha-list-paired-dialect Buffer → AST 1,275,820 1,275,820 1.0000×
alpha-list-paired-common Source → buffer 233,331 233,331 1.0000×
alpha-list-paired-common Buffer → AST 1,275,820 1,275,820 1.0000×
anchor-paired-dialect Source → buffer 104,401 104,401 1.0000×
anchor-paired-dialect Buffer → AST 336,449 336,449 1.0000×
anchor-paired-common Source → buffer 141,411 141,411 1.0000×
anchor-paired-common Buffer → AST 338,680 338,680 1.0000×
anchor-last-empty-paired-dialect Source → buffer 35,015 35,015 1.0000×
anchor-last-empty-paired-dialect Buffer → AST 84,336 84,336 1.0000×

Corpus: 0ac517a3db11cc260db2fe63097f40cd67fb8881a2eab551570082c36b52c034 · Grammar: 003131631321aed6ce88b38f9b46bdfcb504b23929ae39571ed04e245b65c97f.
Full reference comparisons, all workloads, toolchain identities and raw profiles are in the run artifacts.

Grammar-equivalent reference comparisons

A = Core on dialect input; B = Core on common input; R = cmark/cmark-gfm on common input. Ir covers the two parse stages. Whole means the declared language; local excludes the unmatched host. Each input is measured once. No AST equivalence or equal native output cost is asserted.

Certificate Alphabet Scope Units Bytes A/B A/B B/R A/R
alpha-list-grammar-v2 ASCII whole 26 5,579/5,596 1.0015× 1.4210× 1.4231×
anchor-grammar-v2 ASCII whole 12 2,405/2,513 0.9183× 1.1011× 1.0111×
anchor-last-empty-grammar-v2 ASCII whole 12 458/374 1.0362× 1.5023× 1.5566×
anonymous-container-grammar-v2 ASCII whole 12 2,429/2,357 1.0509× 1.5142× 1.5914×
attribute-autolink-grammar-v2 ASCII whole 12 479/551 0.7782× 1.4736× 1.1468×
attribute-bare-grammar-v2 ASCII whole 12 240/444 0.9555× 1.4807× 1.4148×
attribute-code-grammar-v2 ASCII whole 12 575/635 0.8260× 1.4959× 1.2356×
attribute-double-grammar-v2 ASCII whole 12 1,649/1,661 1.0258× 1.3887× 1.4245×
attribute-empty-grammar-v2 ASCII whole 12 252/264 0.9970× 1.5365× 1.5319×
attribute-escaped-value-grammar-v2 ASCII whole 12 446/458 0.9855× 1.4303× 1.4096×
attribute-fence-grammar-v2 ASCII whole 12 587/659 0.5132× 1.3132× 0.6739×
attribute-heading-grammar-v2 ASCII whole 12 1,589/1,577 0.9690× 1.7044× 1.6515×
attribute-image-grammar-v2 ASCII whole 12 1,718/1,790 0.9479× 1.4424× 1.3672×
attribute-link-grammar-v2 ASCII whole 12 1,706/1,778 0.9452× 1.3834× 1.3076×
attribute-newline-grammar-v2 ASCII whole 12 446/410 1.0633× 1.5343× 1.6314×
attribute-order-grammar-v2 ASCII whole 12 632/575 0.9890× 1.4775× 1.4613×
attribute-reference-grammar-v2 ASCII whole 12 3,822/3,774 1.0091× 0.8908× 0.8989×
attribute-single-grammar-v2 ASCII whole 12 1,649/1,661 1.0258× 1.3887× 1.4246×
attribute-unquoted-grammar-v2 ASCII whole 12 1,625/1,661 1.0262× 1.3887× 1.4252×
block-id-container-list-grammar-v2 ASCII whole 12 2,405/2,501 0.9219× 1.1083× 1.0217×
block-id-container-table-grammar-v2 ASCII whole 12 1,453/1,549 0.8643× 0.6749× 0.5833×
block-id-escaped-grammar-v2 ASCII whole 12 204/204 1.0000× 1.4420× 1.4420×
block-id-list-grammar-v2 ASCII whole 12 3,539/3,707 0.8374× 0.9280× 0.7771×
block-id-paragraph-grammar-v2 ASCII whole 12 2,369/2,489 0.8425× 1.0876× 0.9162×
callout-grammar-v2 ASCII whole 12 1,415/1,515 0.9648× 1.2799× 1.2348×
citation-affixes-grammar-v2 ASCII whole 12 587/611 1.3093× 1.5414× 2.0182×
citation-group-grammar-v2 ASCII whole 12 297/537 0.9745× 1.4885× 1.4507×
cite-author-grammar-v2 ASCII whole 12 180/288 1.0667× 1.5367× 1.6392×
cite-normal-grammar-v2 ASCII whole 12 204/288 1.2347× 1.5367× 1.8974×
cite-suppress-grammar-v2 ASCII whole 12 192/288 1.0509× 1.5367× 1.6148×
class-span-grammar-v2 ASCII whole 12 314/314 1.0187× 1.5190× 1.5473×
comment-empty-grammar-v2 ASCII whole 12 216/228 1.0233× 1.5468× 1.5828×
common-anchor-generation-grammar-v2 ASCII whole 12 348/348 1.0000× 2.0896× 2.0896×
common-angle-autolink-grammar-v2 ASCII whole 12 686/686 1.0000× 1.4473× 1.4473×
common-atx-1-grammar-v2 ASCII whole 12 1,371/1,371 1.0000× 2.0023× 2.0023×
common-atx-2-grammar-v2 ASCII whole 12 1,383/1,383 1.0000× 2.0004× 2.0004×
common-atx-3-grammar-v2 ASCII whole 12 1,395/1,395 1.0000× 1.9993× 1.9993×
common-atx-4-grammar-v2 ASCII whole 12 1,407/1,407 1.0000× 1.9972× 1.9972×
common-atx-5-grammar-v2 ASCII whole 12 1,419/1,419 1.0000× 1.9959× 1.9959×
common-atx-6-grammar-v2 ASCII whole 12 1,431/1,431 1.0000× 1.9942× 1.9942×
common-bullet-dash-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.5061× 1.5061×
common-bullet-plus-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.5003× 1.5003×
common-bullet-star-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.5020× 1.5020×
common-code-fence-backtick-grammar-v2 ASCII whole 12 405/405 1.0000× 1.2708× 1.2708×
common-code-fence-tilde-grammar-v2 ASCII whole 12 405/405 1.0000× 1.2709× 1.2709×
common-code-newline-grammar-v2 ASCII whole 12 314/314 1.0000× 1.5538× 1.5538×
common-code-span-grammar-v2 ASCII whole 12 434/434 1.0000× 1.5452× 1.5452×
common-emphasis-asterisk-grammar-v2 ASCII whole 12 491/491 1.0000× 1.4307× 1.4307×
common-emphasis-underscore-grammar-v2 ASCII whole 12 491/491 1.0000× 1.4309× 1.4309×
common-entities-grammar-v2 ASCII whole 12 770/770 1.0000× 1.0112× 1.0112×
common-eol-cr-grammar-v2 ASCII whole 12 1,493/1,493 1.0000× 1.4673× 1.4673×
common-eol-crlf-grammar-v2 ASCII whole 12 1,529/1,529 1.0000× 1.4963× 1.4963×
common-eol-lf-grammar-v2 ASCII whole 12 1,493/1,493 1.0000× 1.4676× 1.4676×
common-escapes-grammar-v2 ASCII whole 12 422/422 1.0000× 1.0294× 1.0294×
common-hardbreak-backslash-grammar-v2 ASCII whole 12 2,297/2,297 1.0000× 1.4523× 1.4523×
common-hardbreak-spaces-grammar-v2 ASCII whole 12 2,309/2,309 1.0000× 1.4475× 1.4475×
common-html-block-tag-grammar-v2 ASCII whole 12 204/204 1.0000× 1.3454× 1.3454×
common-html-cdata-grammar-v2 ASCII whole 12 192/192 1.0000× 1.3607× 1.3607×
common-html-comment-grammar-v2 ASCII whole 12 369/369 1.0000× 1.5259× 1.5259×
common-html-complete-tag-grammar-v2 ASCII whole 12 288/288 1.0000× 1.3225× 1.3225×
common-html-declaration-grammar-v2 ASCII whole 12 180/180 1.0000× 1.3507× 1.3507×
common-html-instruction-grammar-v2 ASCII whole 12 228/228 1.0000× 1.3290× 1.3290×
common-html-raw-grammar-v2 ASCII whole 12 276/276 1.0000× 1.2773× 1.2773×
common-image-grammar-v2 ASCII whole 12 1,694/1,694 1.0000× 1.4517× 1.4517×
common-indented-code-grammar-v2 ASCII whole 12 278/278 1.0000× 1.4849× 1.4849×
common-inline-comment-grammar-v2 ASCII whole 12 489/489 1.0000× 1.4849× 1.4849×
common-inline-html-grammar-v2 ASCII whole 12 1,755/1,755 1.0000× 1.4348× 1.4348×
common-link-direct-grammar-v2 ASCII whole 12 1,682/1,682 1.0000× 1.3867× 1.3867×
common-list-loose-grammar-v2 ASCII whole 12 2,417/2,417 1.0000× 1.5007× 1.5007×
common-list-parenthesis-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.5063× 1.5063×
common-paragraph-grammar-v2 ASCII whole 12 2,465/2,465 1.0000× 1.5667× 1.5667×
common-quote-grammar-v2 ASCII whole 12 2,405/2,405 1.0000× 1.4862× 1.4862×
common-reference-collapsed-grammar-v2 ASCII whole 12 2,511/2,511 1.0000× 0.7255× 0.7255×
common-reference-duplicate-grammar-v2 ASCII whole 12 3,425/3,425 1.0000× 0.6047× 0.6047×
common-reference-full-grammar-v2 ASCII whole 12 3,798/3,798 1.0000× 0.9160× 0.9160×
common-reference-shortcut-grammar-v2 ASCII whole 12 2,487/2,487 1.0000× 0.7283× 0.7283×
common-setext-one-grammar-v2 ASCII whole 12 2,333/2,333 1.0000× 2.0244× 2.0244×
common-setext-two-grammar-v2 ASCII whole 12 2,333/2,333 1.0000× 2.0244× 2.0244×
common-softbreak-grammar-v2 ASCII whole 12 2,285/2,285 1.0000× 1.4477× 1.4477×
common-tabs-grammar-v2 ASCII whole 12 1,395/1,395 1.0000× 1.4882× 1.4882×
common-thematic-dash-grammar-v2 ASCII whole 12 2,381/2,381 1.0000× 1.4957× 1.4957×
common-thematic-star-grammar-v2 ASCII whole 12 2,381/2,381 1.0000× 1.4939× 1.4939×
common-thematic-underscore-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.4943× 1.4943×
common-unresolved-reference-grammar-v2 ASCII whole 12 1,563/1,563 1.0000× 1.2490× 1.2490×
composition-directive-callout-grammar-v2 ASCII whole 12 1,503/1,491 0.9172× 1.5057× 1.3811×
composition-literal-islands-grammar-v2 ASCII whole 12 470/470 0.9988× 1.4918× 1.4900×
cross-anchor-grammar-v2 ASCII whole 12 273/285 0.8660× 1.5328× 1.3274×
cross-block-anchor-grammar-v2 ASCII whole 12 285/297 0.8667× 1.5260× 1.3226×
cross-embed-grammar-v2 ASCII whole 12 498/534 0.8408× 1.4599× 1.2274×
cross-embed-absent-grammar-v2 ASCII whole 12 249/261 0.8359× 1.5543× 1.2993×
cross-embed-empty-grammar-v2 ASCII whole 12 261/297 0.8336× 1.5220× 1.2687×
cross-embed-table-grammar-v2 ASCII whole 12 1,881/1,869 0.9678× 0.9643× 0.9332×
cross-link-grammar-v2 ASCII whole 12 486/522 0.8343× 1.4635× 1.2209×
cross-link-absent-grammar-v2 ASCII whole 12 237/249 0.8325× 1.5556× 1.2950×
cross-link-empty-grammar-v2 ASCII whole 12 249/285 0.8259× 1.5235× 1.2583×
cross-link-table-grammar-v2 ASCII whole 12 1,869/1,857 0.9711× 0.9662× 0.9383×
cross-local-grammar-v2 ASCII whole 12 228/240 0.8609× 1.5616× 1.3444×
cross-raw-label-grammar-v2 ASCII whole 12 312/336 0.8521× 1.5099× 1.2865×
decimal-list-grammar-v2 ASCII whole 12 2,364/2,364 1.0000× 1.5066× 1.5066×
default-list-grammar-v2 ASCII whole 12 2,357/2,357 1.0015× 1.5072× 1.5094×
definition-blocks-grammar-v2 ASCII whole 12 2,417/2,417 1.0363× 1.5298× 1.5853×
directive-attribute-only-grammar-v2 ASCII whole 12 326/374 0.9304× 1.5023× 1.3977×
directive-both-parts-grammar-v2 ASCII whole 12 1,637/1,661 1.0963× 1.3887× 1.5225×
directive-leaf-bare-grammar-v2 ASCII whole 12 72/108 0.4768× 1.4273× 0.6806×
directive-nested-grammar-v2 ASCII whole 12 1,673/1,625 0.8571× 1.5209× 1.3035×
directive-unbraced-grammar-v2 ASCII whole 12 1,491/1,419 0.9172× 1.4940× 1.3703×
directive-unicode-grammar-v2 ASCII whole 12 1,637/1,661 1.0532× 1.3699× 1.4428×
embed-dimensions-grammar-v2 ASCII local 12 378/378 1.0000× 1.5728× 1.5728×
empty-directive-grammar-v2 ASCII whole 12 204/228 1.0730× 1.5687× 1.6832×
enclosed-default-list-grammar-v2 ASCII whole 12 2,381/2,357 1.0020× 1.5064× 1.5093×
fallback-footnote-grammar-v2 ASCII whole 12 204/204 1.0000× 1.2778× 1.2778×
fallback-list-limit-grammar-v2 ASCII whole 12 1,455/1,455 1.0000× 1.4273× 1.4273×
fallback-strike-grammar-v2 ASCII whole 12 1,455/1,455 1.0000× 0.9792× 0.9792×
fallback-task-separator-grammar-v2 ASCII whole 12 503/503 1.0000× 1.1562× 1.1562×
footnote-nested-inline-grammar-v2 ASCII whole 12 419/419 1.1200× 1.4513× 1.6256×
footnote-retention-grammar-v2 ASCII whole 12 8,088/8,088 1.0000× 0.7597× 0.7597×
formula-backtick-grammar-v2 ASCII whole 12 429/405 1.0267× 1.5578× 1.5994×
formula-bracket-grammar-v2 ASCII whole 12 453/405 1.1438× 1.5578× 1.7818×
formula-bracket-block-grammar-v2 ASCII whole 12 357/357 1.0186× 1.3530× 1.3781×
formula-parenthesis-grammar-v2 ASCII whole 12 453/405 1.1478× 1.5578× 1.7880×
gfm-bare-autolink-grammar-v2 ASCII whole 12 695/695 1.0000× 1.0222× 1.0222×
gfm-footnote-grammar-v2 ASCII whole 12 3,593/3,593 1.0000× 0.8092× 0.8092×
gfm-footnote-blocks-grammar-v2 ASCII whole 12 4,627/4,627 1.0000× 0.8638× 0.8638×
gfm-footnote-cycle-grammar-v2 ASCII whole 12 4,614/4,614 1.0000× 0.7646× 0.7646×
gfm-pipe-ragged-grammar-v2 ASCII whole 12 815/815 1.0000× 0.8044× 0.8044×
gfm-pipe-table-grammar-v2 ASCII whole 12 2,714/2,714 1.0000× 0.9289× 0.9289×
gfm-strike-grammar-v2 ASCII whole 12 1,479/1,479 1.0000× 0.9903× 0.9903×
gfm-task-lower-grammar-v2 ASCII whole 12 1,383/1,383 1.0000× 1.0231× 1.0231×
gfm-task-open-grammar-v2 ASCII whole 12 1,383/1,383 1.0000× 1.0166× 1.0166×
gfm-task-upper-grammar-v2 ASCII whole 12 1,383/1,383 1.0000× 1.0188× 1.0188×
heading-explicit-id-grammar-v2 ASCII whole 12 2,405/2,513 0.8328× 1.4097× 1.1740×
heading-reference-grammar-v2 ASCII whole 12 2,140/3,198 1.1590× 0.6529× 0.7567×
image-dimensions-grammar-v2 ASCII local 12 378/378 1.0000× 1.5728× 1.5728×
inline-directive-grammar-v2 ASCII whole 12 1,491/1,515 1.0642× 1.3858× 1.4747×
inline-footnote-grammar-v2 ASCII whole 12 1,467/1,539 1.0325× 1.3830× 1.4279×
insertion-strong-grammar-v2 ASCII whole 12 1,479/1,479 0.9976× 1.4363× 1.4329×
leaf-comment-grammar-v2 ASCII whole 12 333/357 1.2172× 1.3530× 1.6468×
leaf-directive-grammar-v2 ASCII whole 12 1,383/1,395 1.0534× 1.2713× 1.3392×
leaf-fence-grammar-v2 ASCII whole 12 441/357 1.2759× 1.3530× 1.7262×
leaf-formula-grammar-v2 ASCII whole 12 333/357 1.0049× 1.3530× 1.3596×
loose-definition-grammar-v2 ASCII whole 12 1,596/1,620 1.0403× 1.5182× 1.5794×
mark-formatting-grammar-v2 ASCII whole 12 1,479/1,479 0.9996× 1.4363× 1.4358×
metadata-grammar-v2 ASCII local 12 1,469/1,469 1.0000× 1.4705× 1.4705×
metadata-literal-grammar-v2 ASCII local 12 1,754/1,754 1.0000× 1.4904× 1.4904×
metadata-types-grammar-v2 ASCII local 12 1,541/1,541 1.0000× 1.4938× 1.4938×
metadataempty-grammar-v2 ASCII local 12 1,541/1,541 1.0000× 1.4938× 1.4938×
mixed-definitions-grammar-v2 ASCII whole 12 2,795/3,047 0.9566× 1.5648× 1.4968×
named-container-grammar-v2 ASCII whole 12 2,417/2,441 0.9424× 1.5337× 1.4453×
opaque-comment-grammar-v2 ASCII whole 12 429/429 0.9374× 1.5500× 1.4529×
opaque-display-grammar-v2 ASCII whole 12 429/429 1.0082× 1.5500× 1.5627×
opaque-formula-grammar-v2 ASCII whole 12 405/405 1.0178× 1.5578× 1.5855×
record-span-grammar-v2 ASCII whole 12 1,649/1,661 1.0258× 1.3887× 1.4245×
roman-list-grammar-v2 ASCII whole 26 5,628/5,596 1.0165× 1.4210× 1.4445×
run-insertion-grammar-v2 ASCII whole 12 429/429 0.9986× 1.5441× 1.5419×
run-mark-grammar-v2 ASCII whole 12 429/429 0.9986× 1.5441× 1.5419×
run-strike-grammar-v2 ASCII whole 12 429/429 0.9971× 1.5441× 1.5395×
run-sub-grammar-v2 ASCII whole 12 278/278 0.9951× 1.4814× 1.4741×
run-super-grammar-v2 ASCII whole 12 278/278 1.0005× 1.4814× 1.4822×
script-empty-grammar-v2 ASCII whole 12 192/288 0.9384× 1.5457× 1.4505×
script-escaped-space-grammar-v2 ASCII whole 12 326/374 0.9546× 1.3574× 1.2958×
script-formatting-grammar-v2 ASCII whole 12 216/240 1.1336× 1.5028× 1.7036×
span-empty-grammar-v2 ASCII whole 12 314/314 1.0187× 1.5190× 1.5473×
span-nested-grammar-v2 ASCII whole 12 1,601/1,601 1.0346× 1.3765× 1.4241×
specimen-graph-grammar-v2 ASCII whole 12 3,581/3,593 0.9271× 0.8128× 0.7535×
specimen-groups-grammar-v2 ASCII whole 12 7,022/7,034 0.9654× 1.2068× 1.1651×
specimen-reset-grammar-v2 ASCII whole 12 3,629/4,699 0.8590× 1.0295× 0.8843×
task-heading-grammar-v2 ASCII whole 12 1,407/1,359 1.0103× 1.9818× 2.0022×
task-nested-grammar-v2 ASCII whole 12 2,477/2,477 1.0000× 1.0213× 1.0213×
task-unicode-grammar-v2 ASCII whole 12 1,407/1,383 1.0019× 1.0231× 1.0250×
task-value-grammar-v2 ASCII whole 12 2,429/2,429 1.0000× 1.0310× 1.0310×
topic-grammar-v2 ASCII whole 12 180/192 0.9302× 1.6713× 1.5547×
upper-list-grammar-v2 ASCII whole 26 5,631/5,596 1.0047× 1.4210× 1.4278×
upper-roman-list-grammar-v2 ASCII whole 26 5,628/5,596 1.0161× 1.4210× 1.4440×
alpha-list-grammar-v2 UTF-8 whole 26 12,810/12,827 1.0015× 1.2289× 1.2307×
anchor-grammar-v2 UTF-8 whole 12 4,121/4,229 0.9153× 0.9899× 0.9061×
anchor-last-empty-grammar-v2 UTF-8 whole 12 734/650 1.0058× 1.4368× 1.4451×
anonymous-container-grammar-v2 UTF-8 whole 12 5,534/5,462 1.0517× 1.2595× 1.3247×
attribute-autolink-grammar-v2 UTF-8 whole 12 838/910 0.7688× 1.4125× 1.0859×
attribute-bare-grammar-v2 UTF-8 whole 12 276/480 0.9515× 1.4637× 1.3928×
attribute-code-grammar-v2 UTF-8 whole 12 1,275/1,335 0.8362× 1.3340× 1.1155×
attribute-double-grammar-v2 UTF-8 whole 12 3,641/3,653 1.0557× 1.1922× 1.2586×
attribute-empty-grammar-v2 UTF-8 whole 12 288/300 0.9942× 1.5155× 1.5067×
attribute-escaped-value-grammar-v2 UTF-8 whole 12 722/734 0.9596× 1.3866× 1.3306×
attribute-fence-grammar-v2 UTF-8 whole 12 1,287/1,359 0.5405× 1.2547× 0.6781×
attribute-heading-grammar-v2 UTF-8 whole 12 3,581/3,569 1.0346× 1.5411× 1.5945×
attribute-image-grammar-v2 UTF-8 whole 12 3,793/3,865 0.9733× 1.2954× 1.2607×
attribute-link-grammar-v2 UTF-8 whole 12 3,781/3,853 0.9713× 1.2138× 1.1789×
attribute-newline-grammar-v2 UTF-8 whole 12 722/686 1.0798× 1.5133× 1.6341×
attribute-order-grammar-v2 UTF-8 whole 12 1,074/934 0.9999× 1.4291× 1.4290×
attribute-reference-grammar-v2 UTF-8 whole 12 5,978/5,930 1.0346× 0.6787× 0.7022×
attribute-single-grammar-v2 UTF-8 whole 12 3,641/3,653 1.0558× 1.1922× 1.2587×
attribute-unquoted-grammar-v2 UTF-8 whole 12 3,617/3,653 1.0548× 1.1922× 1.2575×
block-id-container-list-grammar-v2 UTF-8 whole 12 4,121/4,217 0.9192× 1.0000× 0.9191×
block-id-container-table-grammar-v2 UTF-8 whole 12 1,776/1,872 0.8719× 0.6866× 0.5986×
block-id-escaped-grammar-v2 UTF-8 whole 12 204/204 1.0000× 1.4420× 1.4420×
block-id-list-grammar-v2 UTF-8 whole 12 5,255/5,423 0.8334× 0.8613× 0.7178×
block-id-paragraph-grammar-v2 UTF-8 whole 12 4,085/4,205 0.8403× 0.9761× 0.8202×
callout-grammar-v2 UTF-8 whole 12 3,131/3,231 1.0483× 1.0466× 1.0971×
citation-affixes-grammar-v2 UTF-8 whole 12 1,287/1,311 1.2607× 1.3540× 1.7069×
citation-group-grammar-v2 UTF-8 whole 12 416/656 0.9735× 1.4869× 1.4475×
cite-author-grammar-v2 UTF-8 whole 12 216/324 1.0676× 1.5240× 1.6270×
cite-normal-grammar-v2 UTF-8 whole 12 240/324 1.2305× 1.5240× 1.8753×
cite-suppress-grammar-v2 UTF-8 whole 12 228/324 1.0476× 1.5240× 1.5965×
class-span-grammar-v2 UTF-8 whole 12 554/554 0.9878× 1.4119× 1.3946×
comment-empty-grammar-v2 UTF-8 whole 12 252/264 1.0233× 1.5289× 1.5644×
common-anchor-generation-grammar-v2 UTF-8 whole 12 420/420 1.0000× 2.0956× 2.0956×
common-angle-autolink-grammar-v2 UTF-8 whole 12 722/722 1.0000× 1.4453× 1.4453×
common-atx-1-grammar-v2 UTF-8 whole 12 3,087/3,087 1.0000× 1.9097× 1.9097×
common-atx-2-grammar-v2 UTF-8 whole 12 3,099/3,099 1.0000× 1.9087× 1.9087×
common-atx-3-grammar-v2 UTF-8 whole 12 3,111/3,111 1.0000× 1.9074× 1.9074×
common-atx-4-grammar-v2 UTF-8 whole 12 3,123/3,123 1.0000× 1.9061× 1.9061×
common-atx-5-grammar-v2 UTF-8 whole 12 3,135/3,135 1.0000× 1.9051× 1.9051×
common-atx-6-grammar-v2 UTF-8 whole 12 3,147/3,147 1.0000× 1.9038× 1.9038×
common-bullet-dash-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2646× 1.2646×
common-bullet-plus-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2591× 1.2591×
common-bullet-star-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2609× 1.2609×
common-code-fence-backtick-grammar-v2 UTF-8 whole 12 829/829 1.0000× 1.2065× 1.2065×
common-code-fence-tilde-grammar-v2 UTF-8 whole 12 829/829 1.0000× 1.2067× 1.2067×
common-code-newline-grammar-v2 UTF-8 whole 12 590/590 1.0000× 1.4565× 1.4565×
common-code-span-grammar-v2 UTF-8 whole 12 710/710 1.0000× 1.4825× 1.4825×
common-emphasis-asterisk-grammar-v2 UTF-8 whole 12 850/850 1.0000× 1.3867× 1.3867×
common-emphasis-underscore-grammar-v2 UTF-8 whole 12 850/850 1.0000× 1.3869× 1.3869×
common-entities-grammar-v2 UTF-8 whole 12 1,046/1,046 1.0000× 0.9919× 0.9919×
common-eol-cr-grammar-v2 UTF-8 whole 12 3,449/3,449 1.0000× 1.2488× 1.2488×
common-eol-crlf-grammar-v2 UTF-8 whole 12 3,485/3,485 1.0000× 1.2740× 1.2740×
common-eol-lf-grammar-v2 UTF-8 whole 12 3,449/3,449 1.0000× 1.2489× 1.2489×
common-escapes-grammar-v2 UTF-8 whole 12 698/698 1.0000× 1.0344× 1.0344×
common-hardbreak-backslash-grammar-v2 UTF-8 whole 12 5,402/5,402 1.0000× 1.2021× 1.2021×
common-hardbreak-spaces-grammar-v2 UTF-8 whole 12 5,414/5,414 1.0000× 1.1962× 1.1962×
common-html-block-tag-grammar-v2 UTF-8 whole 12 240/240 1.0000× 1.3387× 1.3387×
common-html-cdata-grammar-v2 UTF-8 whole 12 228/228 1.0000× 1.3422× 1.3422×
common-html-comment-grammar-v2 UTF-8 whole 12 793/793 1.0000× 1.4703× 1.4703×
common-html-complete-tag-grammar-v2 UTF-8 whole 12 324/324 1.0000× 1.3030× 1.3030×
common-html-declaration-grammar-v2 UTF-8 whole 12 216/216 1.0000× 1.3344× 1.3344×
common-html-instruction-grammar-v2 UTF-8 whole 12 264/264 1.0000× 1.3195× 1.3195×
common-html-raw-grammar-v2 UTF-8 whole 12 312/312 1.0000× 1.2725× 1.2725×
common-image-grammar-v2 UTF-8 whole 12 3,733/3,733 1.0000× 1.2822× 1.2822×
common-indented-code-grammar-v2 UTF-8 whole 12 554/554 1.0000× 1.3815× 1.3815×
common-inline-comment-grammar-v2 UTF-8 whole 12 913/913 1.0000× 1.4177× 1.4177×
common-inline-html-grammar-v2 UTF-8 whole 12 3,507/3,507 1.0000× 1.2265× 1.2265×
common-link-direct-grammar-v2 UTF-8 whole 12 3,721/3,721 1.0000× 1.1946× 1.1946×
common-list-loose-grammar-v2 UTF-8 whole 12 5,522/5,522 1.0000× 1.2717× 1.2717×
common-list-parenthesis-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2594× 1.2594×
common-paragraph-grammar-v2 UTF-8 whole 12 5,570/5,570 1.0000× 1.2968× 1.2968×
common-quote-grammar-v2 UTF-8 whole 12 5,546/5,546 1.0000× 1.2527× 1.2527×
common-reference-collapsed-grammar-v2 UTF-8 whole 12 2,900/2,900 1.0000× 0.5370× 0.5370×
common-reference-duplicate-grammar-v2 UTF-8 whole 12 3,847/3,847 1.0000× 0.4419× 0.4419×
common-reference-full-grammar-v2 UTF-8 whole 12 5,903/5,903 1.0000× 0.7018× 0.7018×
common-reference-shortcut-grammar-v2 UTF-8 whole 12 2,876/2,876 1.0000× 0.5383× 0.5383×
common-setext-one-grammar-v2 UTF-8 whole 12 5,438/5,438 1.0000× 1.8554× 1.8554×
common-setext-two-grammar-v2 UTF-8 whole 12 5,438/5,438 1.0000× 1.8554× 1.8554×
common-softbreak-grammar-v2 UTF-8 whole 12 5,390/5,390 1.0000× 1.1985× 1.1985×
common-tabs-grammar-v2 UTF-8 whole 12 3,147/3,147 1.0000× 1.2850× 1.2850×
common-thematic-dash-grammar-v2 UTF-8 whole 12 5,486/5,486 1.0000× 1.2497× 1.2497×
common-thematic-star-grammar-v2 UTF-8 whole 12 5,486/5,486 1.0000× 1.2481× 1.2481×
common-thematic-underscore-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2481× 1.2481×
common-unresolved-reference-grammar-v2 UTF-8 whole 12 3,279/3,279 1.0000× 1.0969× 1.0969×
composition-directive-callout-grammar-v2 UTF-8 whole 12 3,255/3,243 0.9217× 1.2996× 1.1979×
composition-literal-islands-grammar-v2 UTF-8 whole 12 746/746 0.9989× 1.4390× 1.4374×
cross-anchor-grammar-v2 UTF-8 whole 12 407/419 0.8811× 1.4610× 1.2873×
cross-block-anchor-grammar-v2 UTF-8 whole 12 419/431 0.8838× 1.4577× 1.2882×
cross-embed-grammar-v2 UTF-8 whole 12 1,005/1,041 0.8788× 1.3570× 1.1925×
cross-embed-absent-grammar-v2 UTF-8 whole 12 332/344 0.8410× 1.5157× 1.2746×
cross-embed-empty-grammar-v2 UTF-8 whole 12 344/380 0.8384× 1.4841× 1.2442×
cross-embed-table-grammar-v2 UTF-8 whole 12 4,104/4,092 0.9887× 0.9549× 0.9441×
cross-link-grammar-v2 UTF-8 whole 12 993/1,029 0.8725× 1.3583× 1.1851×
cross-link-absent-grammar-v2 UTF-8 whole 12 320/332 0.8369× 1.5175× 1.2699×
cross-link-empty-grammar-v2 UTF-8 whole 12 332/368 0.8312× 1.4883× 1.2370×
cross-link-table-grammar-v2 UTF-8 whole 12 4,092/4,080 0.9957× 0.9526× 0.9485×
cross-local-grammar-v2 UTF-8 whole 12 279/291 0.8730× 1.5300× 1.3357×
cross-raw-label-grammar-v2 UTF-8 whole 12 399/423 0.8669× 1.4729× 1.2769×
decimal-list-grammar-v2 UTF-8 whole 12 5,469/5,469 1.0000× 1.2598× 1.2598×
default-list-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0015× 1.2601× 1.2620×
definition-blocks-grammar-v2 UTF-8 whole 12 5,558/5,558 1.0390× 1.2913× 1.3416×
directive-attribute-only-grammar-v2 UTF-8 whole 12 602/650 0.9093× 1.4368× 1.3064×
directive-both-parts-grammar-v2 UTF-8 whole 12 3,629/3,653 1.1352× 1.1922× 1.3534×
directive-leaf-bare-grammar-v2 UTF-8 whole 12 108/144 0.4854× 1.4020× 0.6806×
directive-nested-grammar-v2 UTF-8 whole 12 3,665/3,617 0.8699× 1.3231× 1.1509×
directive-unbraced-grammar-v2 UTF-8 whole 12 3,243/3,171 0.9222× 1.2840× 1.1841×
directive-unicode-grammar-v2 UTF-8 whole 12 3,593/3,617 1.0485× 1.1867× 1.2442×
embed-dimensions-grammar-v2 UTF-8 local 12 885/885 1.0000× 1.4254× 1.4254×
empty-directive-grammar-v2 UTF-8 whole 12 240/264 1.0563× 1.5465× 1.6335×
enclosed-default-list-grammar-v2 UTF-8 whole 12 5,486/5,462 1.0020× 1.2594× 1.2619×
fallback-footnote-grammar-v2 UTF-8 whole 12 240/240 1.0000× 1.1785× 1.1785×
fallback-list-limit-grammar-v2 UTF-8 whole 12 3,171/3,171 1.0000× 1.2264× 1.2264×
fallback-strike-grammar-v2 UTF-8 whole 12 3,171/3,171 1.0000× 0.9591× 0.9591×
fallback-task-separator-grammar-v2 UTF-8 whole 12 862/862 1.0000× 1.1367× 1.1367×
footnote-nested-inline-grammar-v2 UTF-8 whole 12 778/778 1.1061× 1.4034× 1.5523×
footnote-retention-grammar-v2 UTF-8 whole 12 11,825/11,825 1.0000× 0.8106× 0.8106×
formula-backtick-grammar-v2 UTF-8 whole 12 853/829 1.0150× 1.4001× 1.4211×
formula-bracket-grammar-v2 UTF-8 whole 12 877/829 1.2899× 1.4001× 1.8059×
formula-bracket-block-grammar-v2 UTF-8 whole 12 781/781 1.0181× 1.2312× 1.2534×
formula-parenthesis-grammar-v2 UTF-8 whole 12 877/829 1.2934× 1.4001× 1.8108×
gfm-bare-autolink-grammar-v2 UTF-8 whole 12 971/971 1.0000× 1.0350× 1.0350×
gfm-footnote-grammar-v2 UTF-8 whole 12 5,377/5,377 1.0000× 0.8618× 0.8618×
gfm-footnote-blocks-grammar-v2 UTF-8 whole 12 7,800/7,800 1.0000× 0.8958× 0.8958×
gfm-footnote-cycle-grammar-v2 UTF-8 whole 12 6,432/6,432 1.0000× 0.8307× 0.8307×
gfm-pipe-ragged-grammar-v2 UTF-8 whole 12 1,174/1,174 1.0000× 0.8111× 0.8111×
gfm-pipe-table-grammar-v2 UTF-8 whole 12 5,938/5,938 1.0000× 0.9244× 0.9244×
gfm-strike-grammar-v2 UTF-8 whole 12 3,195/3,195 1.0000× 0.9760× 0.9760×
gfm-task-lower-grammar-v2 UTF-8 whole 12 3,099/3,099 1.0000× 1.0066× 1.0066×
gfm-task-open-grammar-v2 UTF-8 whole 12 3,099/3,099 1.0000× 0.9950× 0.9950×
gfm-task-upper-grammar-v2 UTF-8 whole 12 3,099/3,099 1.0000× 0.9997× 0.9997×
heading-explicit-id-grammar-v2 UTF-8 whole 12 4,154/4,262 0.8638× 1.2275× 1.0603×
heading-reference-grammar-v2 UTF-8 whole 12 2,206/3,297 1.1088× 0.4905× 0.5439×
image-dimensions-grammar-v2 UTF-8 local 12 885/885 1.0000× 1.4254× 1.4254×
inline-directive-grammar-v2 UTF-8 whole 12 3,243/3,267 1.0729× 1.2081× 1.2961×
inline-footnote-grammar-v2 UTF-8 whole 12 3,183/3,255 1.0267× 1.2091× 1.2414×
insertion-strong-grammar-v2 UTF-8 whole 12 3,195/3,195 0.9976× 1.2325× 1.2295×
leaf-comment-grammar-v2 UTF-8 whole 12 757/781 1.2122× 1.2312× 1.4924×
leaf-directive-grammar-v2 UTF-8 whole 12 3,135/3,147 1.1515× 1.0312× 1.1875×
leaf-fence-grammar-v2 UTF-8 whole 12 865/781 1.2979× 1.2312× 1.5979×
leaf-formula-grammar-v2 UTF-8 whole 12 757/781 1.0052× 1.2312× 1.2375×
loose-definition-grammar-v2 UTF-8 whole 12 3,736/3,760 1.0649× 1.2668× 1.3491×
mark-formatting-grammar-v2 UTF-8 whole 12 3,195/3,195 0.9996× 1.2325× 1.2320×
metadata-grammar-v2 UTF-8 local 12 3,425/3,425 1.0000× 1.2551× 1.2551×
metadata-literal-grammar-v2 UTF-8 local 12 4,134/4,134 1.0000× 1.2635× 1.2635×
metadata-types-grammar-v2 UTF-8 local 12 3,533/3,533 1.0000× 1.2995× 1.2995×
metadataempty-grammar-v2 UTF-8 local 12 3,533/3,533 1.0000× 1.2995× 1.2995×
mixed-definitions-grammar-v2 UTF-8 whole 12 6,494/6,746 0.9607× 1.3645× 1.3109×
named-container-grammar-v2 UTF-8 whole 12 5,558/5,582 0.9452× 1.2893× 1.2187×
opaque-comment-grammar-v2 UTF-8 whole 12 853/853 0.9142× 1.3989× 1.2788×
opaque-display-grammar-v2 UTF-8 whole 12 853/853 0.9979× 1.3989× 1.3960×
opaque-formula-grammar-v2 UTF-8 whole 12 829/829 1.0074× 1.4001× 1.4105×
record-span-grammar-v2 UTF-8 whole 12 3,641/3,653 1.0557× 1.1922× 1.2586×
roman-list-grammar-v2 UTF-8 whole 26 12,859/12,827 1.0168× 1.2289× 1.2495×
run-insertion-grammar-v2 UTF-8 whole 12 853/853 0.9986× 1.3878× 1.3859×
run-mark-grammar-v2 UTF-8 whole 12 853/853 0.9986× 1.3878× 1.3859×
run-strike-grammar-v2 UTF-8 whole 12 853/853 0.9971× 1.3878× 1.3837×
run-sub-grammar-v2 UTF-8 whole 12 518/518 0.9886× 1.4429× 1.4264×
run-super-grammar-v2 UTF-8 whole 12 518/518 0.9938× 1.4429× 1.4339×
script-empty-grammar-v2 UTF-8 whole 12 228/324 0.9379× 1.5292× 1.4342×
script-escaped-space-grammar-v2 UTF-8 whole 12 602/650 0.9514× 1.3087× 1.2451×
script-formatting-grammar-v2 UTF-8 whole 12 252/276 1.1324× 1.4784× 1.6741×
span-empty-grammar-v2 UTF-8 whole 12 554/554 0.9878× 1.4119× 1.3946×
span-nested-grammar-v2 UTF-8 whole 12 3,557/3,557 1.0661× 1.1912× 1.2699×
specimen-graph-grammar-v2 UTF-8 whole 12 5,365/5,377 0.9260× 0.8630× 0.7992×
specimen-groups-grammar-v2 UTF-8 whole 12 11,942/11,954 0.9611× 0.9701× 0.9323×
specimen-reset-grammar-v2 UTF-8 whole 12 5,411/6,514 0.8571× 0.8084× 0.6929×
task-heading-grammar-v2 UTF-8 whole 12 3,123/3,075 1.0109× 1.8978× 1.9184×
task-nested-grammar-v2 UTF-8 whole 12 5,582/5,582 1.0000× 0.9926× 0.9926×
task-unicode-grammar-v2 UTF-8 whole 12 3,123/3,099 1.0019× 1.0066× 1.0084×
task-value-grammar-v2 UTF-8 whole 12 5,534/5,534 1.0000× 1.0025× 1.0025×
topic-grammar-v2 UTF-8 whole 12 216/228 0.9318× 1.6086× 1.4989×
upper-list-grammar-v2 UTF-8 whole 26 12,862/12,827 1.0048× 1.2289× 1.2348×
upper-roman-list-grammar-v2 UTF-8 whole 26 12,859/12,827 1.0164× 1.2289× 1.2491×
Rejection of constructs only Core implements

No reference implements these constructs, so none is measured. B = Core on the common input; C = Core on its control, the same input with the rejected construct's trigger bytes replaced by letters of the same width.

Certificate Alphabet Rejects Units B/C (B − C) Ir per unit
fallback-attributes-grammar-v2 ASCII attribute-block 12 1.0277× 956
fallback-citation-grammar-v2 ASCII citation 12 1.0440× 243
fallback-comment-grammar-v2 ASCII percent-comment 12 1.1435× 4,421
fallback-cross-link-grammar-v2 ASCII cross-link 12 1.1439× 1,045
fallback-directive-grammar-v2 ASCII inline-directive 12 1.2425× 1,320
fallback-formula-grammar-v2 ASCII inline-formula 12 1.1692× 5,210
fallback-image-dimensions-grammar-v2 ASCII image-dimensions 12 1.0006× 6
fallback-insertion-grammar-v2 ASCII insertion 12 1.0612× 1,884
fallback-mark-grammar-v2 ASCII mark 12 1.0612× 1,884
fallback-noninitial-metadata-grammar-v2 ASCII metadata-envelope 12 no control —
fallback-script-grammar-v2 ASCII superscript 12 1.6448× 3,554
fallback-span-grammar-v2 ASCII bracketed-span 12 1.0292× 1,001
fallback-topic-grammar-v2 ASCII topic 12 1.0525× 287
fallback-attributes-grammar-v2 UTF-8 attribute-block 12 1.0603× 2,047
fallback-citation-grammar-v2 UTF-8 citation 12 1.0443× 240
fallback-comment-grammar-v2 UTF-8 percent-comment 12 1.2581× 7,708
fallback-cross-link-grammar-v2 UTF-8 cross-link 12 1.1665× 1,197
fallback-directive-grammar-v2 UTF-8 inline-directive 12 1.2459× 1,317
fallback-formula-grammar-v2 UTF-8 inline-formula 12 1.3131× 9,351
fallback-image-dimensions-grammar-v2 UTF-8 image-dimensions 12 1.0006× 6
fallback-insertion-grammar-v2 UTF-8 insertion 12 1.0639× 1,908
fallback-mark-grammar-v2 UTF-8 mark 12 1.0639× 1,908
fallback-noninitial-metadata-grammar-v2 UTF-8 metadata-envelope 12 no control —
fallback-script-grammar-v2 UTF-8 superscript 12 1.6856× 3,835
fallback-span-grammar-v2 UTF-8 bracketed-span 12 1.0617× 2,082
fallback-topic-grammar-v2 UTF-8 topic 12 1.0817× 437

Attribute grammar

Names and values Engine Lists Values Instructions (Ir) Data reads Data writes
ASCII markdown-core 4,000 12,724 6,716,785 1,659,686 897,971
ASCII lexbor 4,000 12,724 9,508,591 2,337,430 1,396,917
UTF-8 markdown-core 4,000 12,724 8,163,440 2,184,831 907,764
UTF-8 lexbor 4,000 12,724 10,782,778 2,576,993 1,416,849

Core / lexbor instructions on the same recovered attributes: ASCII 0.7064×, UTF-8 0.7571×.

Streams

Subjects: reparse (R), session (S) and binding (B), Ir per window of chunks and for the flush, R counting the two parse stages of each Document.parse; S runs every stream R runs at every step (those of at most 1,024 chunks, and the shapes 6.2 leaves to 6.3 at their smallest size) and every longer stream of a shape the language keeps local, and B the streams of at most 1,024 chunks. 768 workloads · baa4015502b54854.

Stream regressions (+2% per workload and subject in p95, max and total, against 94b9172c10d5): 768/768 passed, 0 exceeded.

Documents Family Size Workloads Windows R p50 R p95 R max R total S p50 S p95 S max S total S / R total Highest step S / R One-shot total
Grammar corpus tokens 384 161,409 252,502 770,499 1,524,081 48,745,608,963 33,479 121,420 505,545 5,298,209,404 0.206× 2.782× 140,060,294
Grammar corpus scalars 384 279,626 199,621 606,054 1,523,012 69,885,001,218 21,272 36,211 218,707 1,316,646,580 0.297× 2.238× 140,060,294

Bindings' C side (B): the MCB3 encode of each document an S window publishes and the release of its message, without building the platform values; no gate.

Documents Family Size B p50 B p95 B max B total B / S total
Grammar corpus tokens 63,539 167,947 296,344 8,456,467,236 1.596×
Grammar corpus scalars 18,245 59,066 122,298 1,450,156,098 1.101×

Edits: Ir per window of edits, R counting the two parse stages of the Document.parse of a window's last edit and S the session's edits of the window, every one; one window per edit except at a shape's larger sizes; no gate. 384 edit workloads.

Documents Family Size Scripts Edits Windows R p50 R p95 R max R total S p50 S p95 S max S total
Grammar corpus typing 384 24,576 24,576 382,691 834,489 1,526,223 8,826,640,696 113,429 297,600 732,814 3,084,103,142
Grammar corpus lines 1,152 6,066 6,066 389,821 864,743 1,526,746 2,238,687,131 42,593 573,061 1,779,821 766,654,861
Grammar corpus markers 384 6,912 6,912 368,544 813,347 1,532,099 2,409,433,637 60,777 566,637 1,694,858 926,694,184
Grammar corpus ranges 384 3,840 3,840 827,298 1,395,608 2,220,706 3,440,061,333 113,265 945,288 1,855,563 701,390,753
Grammar corpus far 384 24,576 24,576 385,455 861,713 1,526,518 9,089,525,873 37,203 705,095 1,775,765 3,552,495,577
Grammar corpus random 384 23,926 23,926 57,559 519,130 1,525,080 3,115,657,523 35,374 220,613 1,456,992 1,512,124,065

Completion latency

Callgrind Ir per completion request: the didChange of one edit and the completion at the end of its text. At most 8 requests a script, at evenly spaced edits. The budget is the plan's proposed p95 wall time on a device, not compared with these counts; no gate.

Documents Budget p95 Workloads Scripts Skipped Requests p50 p95 Max Edit p95 Completion p95
Grammar corpus 1 ms 384 3,072 36 21,150 108,996 682,429 3,633,423 527,478 234,124
Shapes, 16 KiB 1 ms 34 402 1 2,906 151,306 6,324,653 27,609,797 3,964,532 2,863,889
Shapes, 64 KiB 10 ms 40 184 0 1,376 187,014 22,684,611 48,151,925 12,136,630 11,141,305
Shapes, 256 KiB 10 ms 34 136 0 1,088 201,144 61,824,718 178,737,002 4,111,017 42,681,854

@DongyuZhao
DongyuZhao merged commit 78c5cb6 into main Nov 16, 2026
102 checks passed
DongyuZhao pushed a commit that referenced this pull request Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants