Skip to content

Edit: find the readings past a point from the tree and the line index (no-flush PR2) - #522

Open
DongyuZhao wants to merge 315 commits into
mainfrom
claude/project-thread-raxrtq
Open

DongyuZhao wants to merge 315 commits into
mainfrom
claude/project-thread-raxrtq

Conversation

@DongyuZhao

@DongyuZhao DongyuZhao commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Step 2 of docs/plans/no-flush.md §10.7, done as §10.10 describes. The PR has two commits:

  1. The rest and locate queries no longer use the reach log. markdown_core_parser_crossed is deleted. "Did a reading that began before point read past past?" is now answered from the node attributes (opened, closed, look) and the line looks.
  2. The child index moves into core as core/index.{h,c} (markdown_core_index): the widths, the nests, the reach of a node and the crossed query. session.c now only calls it.

What changes

  • Line index. It gets a tree end op (start + look). markdown_core_tree_raise is a new generic op: an entry that grows in place raises its ancestors' furthest value. A new query, markdown_core_parser_line_looked, uses tree_past over the lines.
  • Widths entries. Each entry is now {start, end, reach, cover}:
    • reach is how far the child's subtree read.
    • cover links to the nearest later sibling whose reading began before this child (a paragraph its definitions were cut from).
    • Build and mend keep both fields. The kept previous sibling adds only its own readings, so its subtree is not walked again (from the Codex review).
  • markdown_core_index_crossed. It walks down the blocks that hold the point:
    • siblings before the point are found by tree_past on reach;
    • the child at the point follows its cover links;
    • the chain's own closes are exempt, each once.
    • The walk is iterative, with no depth limit.
  • Exactness fixes in core, found by the differential:
    • The splice lookahead (S_carries) truncated the reach but still wrote a look into a line. It now notes nothing (edit->quiet).
    • A gone block's readings (S_reads_pass) could go to a kept child whose place is stale. They now go only to children the reading made (S_reads_kept).
    • opened counts spans only. markdown_core_node_restart takes the parser and hands the node's look to the line it began on.
    • A chain reopened from the rest point resets its looks.
  • Build lists. index.c is added to Package.swift, Package.release.swift, the Kotlin Android CMake list and the ES build script.

Verification

  • During development, debug builds ran the old and new queries side by side on every call, over all 17 incremental families (4 shards each). They agreed everywhere: same boolean, and the start on the same line. After that, crossed was deleted.
  • The MARKDOWN_CORE_READS_CHECK run reported no record missed on lines, hard and declarations. On random, undo and typing it stopped at the 2-hour time limit without finishing, with no misses up to then.
  • Full ctest: 152/152 passed (debug) on each commit.
  • After the review fix, the incremental, api, context and LSP suites (46 tests) passed again.
  • Format, CMake-format and lint checks pass locally.

The reach log itself goes in PR3.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj

claude added 30 commits November 1, 2026 04:20
…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
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
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
A new benchmark job, "Measure - completion latency", runs the stream
benchmark's edit scripts through the language engine as a client typing
them would: completion_runner opens a server on the document and sends
each edit as didChange, and a measured request is one edit followed by a
completion at the end of its text, both inside bench_request. The driver,
scripts/benchmark/completion.mjs, reads each request's inclusive Ir from
the callgrind call graph, split into the edit and the completion, and
groups the requests by document size (grammar corpus, shapes at 16, 64
and 256 KiB) next to the plan's proposed budget. Report only (D5).

A script is measured at up to 16 evenly spaced edits; a shape larger than
16 KiB is cut to its first 16 edits and measured at 4. Scripts whose edit
splits a \r\n are skipped, since no protocol position names that place.
The runner checks that the session ends in the script's text. The PR
comment shows the size table.

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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Callgrind now starts with instrumentation off, and the completion runner
turns it on around each measured request only, so the edits between run at
valgrind's uninstrumented speed. That removes the cut of large shapes to
their first 16 edits: every script, at every size, is measured at up to 8
evenly spaced edits over the whole script (about 40 minutes on four cores).

A script is also skipped when an edit leaves its cursor between a \r and a
\n, as an inserted \r before a \n does, since no protocol position names
that place and the request would measure a different cursor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
A session edit used to read the whole text again whenever the labels the
text from the rest point declares changed, which typing in any heading
does. Now the edit takes the keys that the declarations of the re-read
range hold and those of the old text it replaced do not, or the other way
round (markdown_core_parser_altered_labels), and a byte filter over the
kept text finds each `[`, `[^` and `@` whose following run may name one.
Each block that holds a hit is read again as an edit of nothing just past
the opener reads it, and the edit reports the union of what it read.

The hard definition cases now end in plain paragraphs and bound what an
edit reads again, and two cases are new: a definition added before the one
a use resolves to, and a definition written over with the reading resuming
before its use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
A label that a line break splits may go on past a container's prefix,
which the lookup strips and the byte filter sees, so the filter now takes
such a run to name the label. The new hard case quoted-label renames a
definition whose use in a block quote breaks after its bracket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The filter compared each opener with every altered label and folded its
run once a label; it now folds the run once and looks its prefixes up
among the altered first words, sorted. The places it finds were read in
one transaction each; they are now read in at most eight, parted at the
widest gaps, each an edit of nothing just past its first place that takes
no old child back before its last (a new `past` bound on the reopen), so
nodes keep their identity. Inserting 4,000 definitions before 4,000
unrelated uses took 743 ms and takes 4 ms; renaming a definition 4,000
paragraphs use took 1,478 ms and takes 9 ms, as reading the text once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
When the word index, the list of places or a rest point could not have
its storage, the edit answered ALLOCATION_FAILED with the definition
changed and its uses not read again, and a later edit published them as
they were. The edit now lets the document go on any failed refresh, as it
does when the altered labels cannot be collected. The api test refuses
each allocation of a rename in turn and checks the next edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
A table cell takes `\|` to `|` before the inline parse looks the label up,
so the bytes the filter folds are not the label the lookup sees. A run
that holds a backslash now may name any label. The new hard case
table-label renames a definition a table cell uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The block replaces a NUL before the inline parse looks the label up, so a
run that holds one now may name any label, as one that holds a backslash
does. The api test renames a definition whose label holds a NUL.

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
An edit at a paragraph's end now parses its inline content from as late
as a snapshot does, instead of from a seam two lines back.

- The seam margin is 0: a seam may lie at the rest line's start. When the
  content no longer reaches past the picked seam (a delimiter row took
  its head, an underline, an interrupting line), S_seam_shrink falls back
  to the last seam the content still reaches past instead of reading the
  paragraph whole.
- Settle starts inside the content's last line are INNER seams. They
  stand only for an edit from where the old content ended on, and only
  while the new content keeps all of the old (S_seam_holds), the same
  condition the snapshot's settle point relies on.
- A paragraph carrying an element flag (a table's TABLE_VISITED) no
  longer leaps: its reopened node kept the flag the old reading set on a
  later line, so a line edited into a valid delimiter row made no table.
  This was wrong on main too.

Test: a paragraph typed at its end, and lines written at its end, dump
as a full parse after every edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Every reach record now ends past the last byte its reading read, and one
that met the text's end ends past it:

- a block's close ends past the line ending of the line that closed it
  (markdown_core_parser_read_past); the splice notes its closes on the old
  line it resumes at (S_close_on, S_line_past);
- every lookahead is noted, the one that read only the next line too;
- link definitions, block identifiers, the properties envelope and the
  definition list term's peek note their true ends.

Records are of two kinds. A span is a block's reading held open across a
point: closes, and a paragraph open from before its definitions. A look
read ahead and decided. One rest rule for edits and locates: a reading
from before the rest point that crosses it stands only when it is a look
that ended no later than the edit's start or the cursor, or a span of a
block of the chain. The splice resumes on a line no reading read past.
The paragraph +1 and first-child +1 rules, and the cut-front special case,
go: what they covered is in the reach now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
…the text's end

Readings track whether they met the input's end; only those reach past it.
Audit fix: the reach ends ask markdown_core_parser_input_text for the size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The reread expectations of hard-type-in-middle-paragraph and the new
quote-lookahead case are written by scripts/benchmark/workloads.mjs.

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

Only a reading that met or waits at the input's end reaches past it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
A reading from before the line that stopped inside it was the opener of
the line's first block (a list's variant from the list before); one that
read the line whole, a lookahead or a close, decided its own line's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
Every reach record now also lands on the tree: a node keeps how far
past its start its opener read (`look`), and the spans its parse took
in and closed (`opened`, `closed`), all relative to `place.start`. A
look that begins on a line where no block starts (a blank line, a
leaf's later line) lands on that line's entry in the line index
instead, so typing inside an unclosed comment keeps its rest point.

The reach log still drives the edit; a debug check
(MARKDOWN_CORE_READS_CHECK, test incremental_reads) asserts that the
node and line attributes cover every record it holds. Nodes grow by
12 bytes, line entries from 16 to 20.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The ES package builds the sources with emcc outside CMake and without
NDEBUG; its standalone module then imported the WASI environment for
the check's getenv, which the packed consumer does not provide. The
check now needs MARKDOWN_CORE_READS_CHECK, which CMake defines when it
builds the tests, and reads the environment on each rest instead of
caching it in a static.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The check walks the tree through the session allocator. A walk that
failed compared a part of the tree against the reach log and asserted
a miss; now it fails the rest as storage the operation could not have,
so the operation reports the allocation failure (regression_strict_oom
with MARKDOWN_CORE_READS_CHECK set).

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

Three ways a look a reading noted went missing from the tree while the
reach log kept it (Codex, incremental_fuzz with the reads check):

- a snapshot ended the held line and gave its waiting look to a view the
  take-back let go; the mark now keeps the waiting look and the rollback
  puts it back;
- a candidate's decision went back before the waiting look's line and the
  settle dropped it; a look from a line before the one in hand now goes
  to that line at once, and a waiting one settles wherever the reading
  stands, unless its line is gone from the input;
- the resume test read from the line that ended and the splice took the
  reading over before that look settled; it settles after the test.

incremental_fuzz now runs with MARKDOWN_CORE_READS_CHECK set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The node grew to 192 bytes and its slot to a size 96 does not divide; the
last block's size became a runtime value and each of its copies a call to
memcpy, which made markdown_core_node_swap 4.6 times its cost and the
streaming session 5% dearer (prose 16k: 114.4M -> 120.4M Ir). Whole blocks
and the rest now have constant sizes: 115.3M.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AvzArumvqU8RFP8mWYPXpj
The rest of an edit and of a locate asks whether a reading that began
before a point read past it. That was answered from the reach log
(markdown_core_parser_crossed); it is now answered from the node
attributes (opened, closed, look) and the line looks alone:

- the line index gets an end op (start + look) and a raise, so the
  first line whose look reads past a byte is a prefix query;
- each widths entry keeps the reach of its child's subtree and a cover
  link to the nearest later sibling whose reading began before it (a
  paragraph its definitions were cut from);
- session_crossed walks down the blocks that hold the point, finds the
  siblings before it by their reach, and follows the cover links from
  the child at the point.

To make the attributes exact:

- a lookahead that notes no reach (S_carries) now notes nothing at all;
- a gone block's readings go only to children the reading made, never
  to a kept child whose place is stale;
- `opened` counts spans only; a restarted node hands its look to the
  line it began on;
- node_reach and the past walk are iterative, with no depth limit.

markdown_core_parser_crossed is deleted. A differential run against it
over every incremental family showed no difference before deletion.

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 18, 2026 05:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 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-18T07:17:02.281429Z b3f8d3e New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3b2009fef0

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

* further, as far as it now does. */
if (first) {
session_width *before = width_tree_at(tree, first - 1);
const uint32_t reach = before->start + node_reach(session, holder->children[first - 1], 0, true);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reuse the cached reach of the retained sibling's subtree

When a large blockquote precedes several small paragraphs, editing the second paragraph repeatedly traverses the entire untouched blockquote here. Its nest is not retained by session_mend_nests, so node_reach falls back to visiting every descendant on every edit, making a constant-sized edit linear in an unrelated prefix. In a Release build, 50 such edits took approximately 1.2 ms with 1,000 quoted paragraphs versus 74 ms with 50,000, although each edit reread only 10 bytes. Preserve the cached descendant reach and incorporate any growth in the retained node's own readings rather than rescanning its unchanged subtree.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed and fixed in b3f8d3e. The only readings that change on the kept previous sibling are its own: S_reads_pass writes to the node itself. So the mend now raises the entry's reach by start + node_own(kept). The full node_reach walk runs only when the sibling is the chain's block, and in that case its nest was just mended, so the walk reads the nest root's furthest value instead of the subtree. The debug nest_check still compares every mended entry, cover included, with a fresh build. The incremental, api, context and LSP suites all pass with that check on.


Generated by Claude Code

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Benchmark

Commit: b3f8d3eb0ceab9acefc3e85d1ab718a2f4fa2fa5 · 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: 5900832335689d2f9a9f4c42901b7858b67a9bd3. 792 document workloads, measured in the same job.

Core instructions (Ir) Base PR PR / base
Source → buffer 62,136,239 62,258,381 1.0020×
Buffer → AST 225,376,935 225,376,227 1.0000×
Both stages 287,513,174 287,634,608 1.0004×
Both stages, ASCII documents 143,314,489 143,375,279 1.0004×
Both stages, UTF-8 documents 144,198,685 144,259,329 1.0004×

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
metadata-types-host-common Source → buffer 181,221 184,429 1.0177×
metadata-types-utf8-host-common Source → buffer 186,511 189,719 1.0172×
metadata-literal-host-dialect Source → buffer 101,089 102,781 1.0167×
metadata-types-host-dialect Source → buffer 204,133 207,307 1.0155×
metadata-literal-utf8-host-dialect Source → buffer 112,906 114,598 1.0150×
metadata-types-utf8-host-dialect Source → buffer 214,247 217,421 1.0148×
common-anchor-generation-paired-dialect Source → buffer 89,836 91,035 1.0133×
common-anchor-generation-paired-common Source → buffer 89,836 91,035 1.0133×
common-anchor-generation-utf8-paired-dialect Source → buffer 90,268 91,467 1.0133×
common-anchor-generation-utf8-paired-common Source → buffer 90,268 91,467 1.0133×

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.4259× 1.4280×
anchor-grammar-v2 ASCII whole 12 2,405/2,513 0.9189× 1.1040× 1.0145×
anchor-last-empty-grammar-v2 ASCII whole 12 458/374 1.0361× 1.5069× 1.5613×
anonymous-container-grammar-v2 ASCII whole 12 2,429/2,357 1.0528× 1.5192× 1.5993×
attribute-autolink-grammar-v2 ASCII whole 12 479/551 0.7783× 1.4775× 1.1500×
attribute-bare-grammar-v2 ASCII whole 12 240/444 0.9556× 1.4852× 1.4193×
attribute-code-grammar-v2 ASCII whole 12 575/635 0.8262× 1.4997× 1.2391×
attribute-double-grammar-v2 ASCII whole 12 1,649/1,661 1.0257× 1.3917× 1.4275×
attribute-empty-grammar-v2 ASCII whole 12 252/264 0.9970× 1.5414× 1.5369×
attribute-escaped-value-grammar-v2 ASCII whole 12 446/458 0.9856× 1.4321× 1.4115×
attribute-fence-grammar-v2 ASCII whole 12 587/659 0.5092× 1.3295× 0.6770×
attribute-heading-grammar-v2 ASCII whole 12 1,589/1,577 0.9690× 1.7069× 1.6539×
attribute-image-grammar-v2 ASCII whole 12 1,718/1,790 0.9478× 1.4453× 1.3699×
attribute-link-grammar-v2 ASCII whole 12 1,706/1,778 0.9452× 1.3863× 1.3103×
attribute-newline-grammar-v2 ASCII whole 12 446/410 1.0638× 1.5388× 1.6370×
attribute-order-grammar-v2 ASCII whole 12 632/575 0.9890× 1.4815× 1.4653×
attribute-reference-grammar-v2 ASCII whole 12 3,822/3,774 1.0090× 0.8927× 0.9008×
attribute-single-grammar-v2 ASCII whole 12 1,649/1,661 1.0258× 1.3917× 1.4275×
attribute-unquoted-grammar-v2 ASCII whole 12 1,625/1,661 1.0262× 1.3917× 1.4281×
block-id-container-list-grammar-v2 ASCII whole 12 2,405/2,501 0.9225× 1.1115× 1.0253×
block-id-container-table-grammar-v2 ASCII whole 12 1,453/1,549 0.8661× 0.6797× 0.5887×
block-id-escaped-grammar-v2 ASCII whole 12 204/204 1.0000× 1.4474× 1.4474×
block-id-list-grammar-v2 ASCII whole 12 3,539/3,707 0.8381× 0.9304× 0.7798×
block-id-paragraph-grammar-v2 ASCII whole 12 2,369/2,489 0.8421× 1.0904× 0.9182×
callout-grammar-v2 ASCII whole 12 1,415/1,515 0.9643× 1.2830× 1.2372×
citation-affixes-grammar-v2 ASCII whole 12 587/611 1.3090× 1.5457× 2.0232×
citation-group-grammar-v2 ASCII whole 12 297/537 0.9749× 1.4922× 1.4547×
cite-author-grammar-v2 ASCII whole 12 180/288 1.0667× 1.5417× 1.6446×
cite-normal-grammar-v2 ASCII whole 12 204/288 1.2344× 1.5417× 1.9031×
cite-suppress-grammar-v2 ASCII whole 12 192/288 1.0509× 1.5417× 1.6202×
class-span-grammar-v2 ASCII whole 12 314/314 1.0186× 1.5239× 1.5523×
comment-empty-grammar-v2 ASCII whole 12 216/228 1.0232× 1.5528× 1.5888×
common-anchor-generation-grammar-v2 ASCII whole 12 348/348 1.0000× 2.1028× 2.1028×
common-angle-autolink-grammar-v2 ASCII whole 12 686/686 1.0000× 1.4509× 1.4509×
common-atx-1-grammar-v2 ASCII whole 12 1,371/1,371 1.0000× 2.0050× 2.0050×
common-atx-2-grammar-v2 ASCII whole 12 1,383/1,383 1.0000× 2.0031× 2.0031×
common-atx-3-grammar-v2 ASCII whole 12 1,395/1,395 1.0000× 2.0022× 2.0022×
common-atx-4-grammar-v2 ASCII whole 12 1,407/1,407 1.0000× 2.0001× 2.0001×
common-atx-5-grammar-v2 ASCII whole 12 1,419/1,419 1.0000× 1.9989× 1.9989×
common-atx-6-grammar-v2 ASCII whole 12 1,431/1,431 1.0000× 1.9971× 1.9971×
common-bullet-dash-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.5104× 1.5104×
common-bullet-plus-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.5047× 1.5047×
common-bullet-star-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.5064× 1.5064×
common-code-fence-backtick-grammar-v2 ASCII whole 12 405/405 1.0000× 1.2789× 1.2789×
common-code-fence-tilde-grammar-v2 ASCII whole 12 405/405 1.0000× 1.2790× 1.2790×
common-code-newline-grammar-v2 ASCII whole 12 314/314 1.0000× 1.5597× 1.5597×
common-code-span-grammar-v2 ASCII whole 12 434/434 1.0000× 1.5499× 1.5499×
common-emphasis-asterisk-grammar-v2 ASCII whole 12 491/491 1.0000× 1.4343× 1.4343×
common-emphasis-underscore-grammar-v2 ASCII whole 12 491/491 1.0000× 1.4346× 1.4346×
common-entities-grammar-v2 ASCII whole 12 770/770 1.0000× 1.0133× 1.0133×
common-eol-cr-grammar-v2 ASCII whole 12 1,493/1,493 1.0000× 1.4708× 1.4708×
common-eol-crlf-grammar-v2 ASCII whole 12 1,529/1,529 1.0000× 1.4998× 1.4998×
common-eol-lf-grammar-v2 ASCII whole 12 1,493/1,493 1.0000× 1.4711× 1.4711×
common-escapes-grammar-v2 ASCII whole 12 422/422 1.0000× 1.0326× 1.0326×
common-hardbreak-backslash-grammar-v2 ASCII whole 12 2,297/2,297 1.0000× 1.4555× 1.4555×
common-hardbreak-spaces-grammar-v2 ASCII whole 12 2,309/2,309 1.0000× 1.4507× 1.4507×
common-html-block-tag-grammar-v2 ASCII whole 12 204/204 1.0000× 1.3548× 1.3548×
common-html-cdata-grammar-v2 ASCII whole 12 192/192 1.0000× 1.3677× 1.3677×
common-html-comment-grammar-v2 ASCII whole 12 369/369 1.0000× 1.5323× 1.5323×
common-html-complete-tag-grammar-v2 ASCII whole 12 288/288 1.0000× 1.3288× 1.3288×
common-html-declaration-grammar-v2 ASCII whole 12 180/180 1.0000× 1.3578× 1.3578×
common-html-instruction-grammar-v2 ASCII whole 12 228/228 1.0000× 1.3359× 1.3359×
common-html-raw-grammar-v2 ASCII whole 12 276/276 1.0000× 1.2860× 1.2860×
common-image-grammar-v2 ASCII whole 12 1,694/1,694 1.0000× 1.4547× 1.4547×
common-indented-code-grammar-v2 ASCII whole 12 278/278 1.0000× 1.4976× 1.4976×
common-inline-comment-grammar-v2 ASCII whole 12 489/489 1.0000× 1.4905× 1.4905×
common-inline-html-grammar-v2 ASCII whole 12 1,755/1,755 1.0000× 1.4380× 1.4380×
common-link-direct-grammar-v2 ASCII whole 12 1,682/1,682 1.0000× 1.3897× 1.3897×
common-list-loose-grammar-v2 ASCII whole 12 2,417/2,417 1.0000× 1.5078× 1.5078×
common-list-parenthesis-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.5104× 1.5104×
common-paragraph-grammar-v2 ASCII whole 12 2,465/2,465 1.0000× 1.5704× 1.5704×
common-quote-grammar-v2 ASCII whole 12 2,405/2,405 1.0000× 1.4905× 1.4905×
common-reference-collapsed-grammar-v2 ASCII whole 12 2,511/2,511 1.0000× 0.7274× 0.7274×
common-reference-duplicate-grammar-v2 ASCII whole 12 3,425/3,425 1.0000× 0.6062× 0.6062×
common-reference-full-grammar-v2 ASCII whole 12 3,798/3,798 1.0000× 0.9181× 0.9181×
common-reference-shortcut-grammar-v2 ASCII whole 12 2,487/2,487 1.0000× 0.7302× 0.7302×
common-setext-one-grammar-v2 ASCII whole 12 2,333/2,333 1.0000× 2.0286× 2.0286×
common-setext-two-grammar-v2 ASCII whole 12 2,333/2,333 1.0000× 2.0286× 2.0286×
common-softbreak-grammar-v2 ASCII whole 12 2,285/2,285 1.0000× 1.4510× 1.4510×
common-tabs-grammar-v2 ASCII whole 12 1,395/1,395 1.0000× 1.4928× 1.4928×
common-thematic-dash-grammar-v2 ASCII whole 12 2,381/2,381 1.0000× 1.5029× 1.5029×
common-thematic-star-grammar-v2 ASCII whole 12 2,381/2,381 1.0000× 1.5010× 1.5010×
common-thematic-underscore-grammar-v2 ASCII whole 12 2,357/2,357 1.0000× 1.5015× 1.5015×
common-unresolved-reference-grammar-v2 ASCII whole 12 1,563/1,563 1.0000× 1.2519× 1.2519×
composition-directive-callout-grammar-v2 ASCII whole 12 1,503/1,491 0.9167× 1.5111× 1.3852×
composition-literal-islands-grammar-v2 ASCII whole 12 470/470 0.9988× 1.4961× 1.4943×
cross-anchor-grammar-v2 ASCII whole 12 273/285 0.8662× 1.5379× 1.3321×
cross-block-anchor-grammar-v2 ASCII whole 12 285/297 0.8670× 1.5310× 1.3273×
cross-embed-grammar-v2 ASCII whole 12 498/534 0.8411× 1.4642× 1.2315×
cross-embed-absent-grammar-v2 ASCII whole 12 249/261 0.8362× 1.5595× 1.3041×
cross-embed-empty-grammar-v2 ASCII whole 12 261/297 0.8339× 1.5269× 1.2732×
cross-embed-table-grammar-v2 ASCII whole 12 1,881/1,869 0.9677× 0.9661× 0.9349×
cross-link-grammar-v2 ASCII whole 12 486/522 0.8346× 1.4678× 1.2250×
cross-link-absent-grammar-v2 ASCII whole 12 237/249 0.8328× 1.5608× 1.2998×
cross-link-empty-grammar-v2 ASCII whole 12 249/285 0.8263× 1.5283× 1.2628×
cross-link-table-grammar-v2 ASCII whole 12 1,869/1,857 0.9711× 0.9680× 0.9401×
cross-local-grammar-v2 ASCII whole 12 228/240 0.8612× 1.5668× 1.3493×
cross-raw-label-grammar-v2 ASCII whole 12 312/336 0.8523× 1.5146× 1.2909×
decimal-list-grammar-v2 ASCII whole 12 2,364/2,364 1.0000× 1.5107× 1.5107×
default-list-grammar-v2 ASCII whole 12 2,357/2,357 1.0015× 1.5113× 1.5135×
definition-blocks-grammar-v2 ASCII whole 12 2,417/2,417 1.0359× 1.5370× 1.5922×
directive-attribute-only-grammar-v2 ASCII whole 12 326/374 0.9304× 1.5069× 1.4021×
directive-both-parts-grammar-v2 ASCII whole 12 1,637/1,661 1.0961× 1.3917× 1.5254×
directive-leaf-bare-grammar-v2 ASCII whole 12 72/108 0.4774× 1.4325× 0.6839×
directive-nested-grammar-v2 ASCII whole 12 1,673/1,625 0.8568× 1.5299× 1.3109×
directive-unbraced-grammar-v2 ASCII whole 12 1,491/1,419 0.9168× 1.4988× 1.3741×
directive-unicode-grammar-v2 ASCII whole 12 1,637/1,661 1.0531× 1.3729× 1.4458×
embed-dimensions-grammar-v2 ASCII local 12 378/378 1.0000× 1.5793× 1.5793×
empty-directive-grammar-v2 ASCII whole 12 204/228 1.0728× 1.5739× 1.6885×
enclosed-default-list-grammar-v2 ASCII whole 12 2,381/2,357 1.0019× 1.5105× 1.5133×
fallback-footnote-grammar-v2 ASCII whole 12 204/204 1.0000× 1.2822× 1.2822×
fallback-list-limit-grammar-v2 ASCII whole 12 1,455/1,455 1.0000× 1.4305× 1.4305×
fallback-strike-grammar-v2 ASCII whole 12 1,455/1,455 1.0000× 0.9815× 0.9815×
fallback-task-separator-grammar-v2 ASCII whole 12 503/503 1.0000× 1.1613× 1.1613×
footnote-nested-inline-grammar-v2 ASCII whole 12 419/419 1.1197× 1.4555× 1.6297×
footnote-retention-grammar-v2 ASCII whole 12 8,088/8,088 1.0000× 0.7619× 0.7619×
formula-backtick-grammar-v2 ASCII whole 12 429/405 1.0266× 1.5630× 1.6046×
formula-bracket-grammar-v2 ASCII whole 12 453/405 1.1433× 1.5630× 1.7870×
formula-bracket-block-grammar-v2 ASCII whole 12 357/357 1.0185× 1.3625× 1.3877×
formula-parenthesis-grammar-v2 ASCII whole 12 453/405 1.1473× 1.5630× 1.7932×
gfm-bare-autolink-grammar-v2 ASCII whole 12 695/695 1.0000× 1.0251× 1.0251×
gfm-footnote-grammar-v2 ASCII whole 12 3,593/3,593 1.0000× 0.8109× 0.8109×
gfm-footnote-blocks-grammar-v2 ASCII whole 12 4,627/4,627 1.0000× 0.8670× 0.8670×
gfm-footnote-cycle-grammar-v2 ASCII whole 12 4,614/4,614 1.0000× 0.7661× 0.7661×
gfm-pipe-ragged-grammar-v2 ASCII whole 12 815/815 1.0000× 0.8060× 0.8060×
gfm-pipe-table-grammar-v2 ASCII whole 12 2,714/2,714 1.0000× 0.9304× 0.9304×
gfm-strike-grammar-v2 ASCII whole 12 1,479/1,479 1.0000× 0.9925× 0.9925×
gfm-task-lower-grammar-v2 ASCII whole 12 1,383/1,383 1.0000× 1.0257× 1.0257×
gfm-task-open-grammar-v2 ASCII whole 12 1,383/1,383 1.0000× 1.0192× 1.0192×
gfm-task-upper-grammar-v2 ASCII whole 12 1,383/1,383 1.0000× 1.0214× 1.0214×
heading-explicit-id-grammar-v2 ASCII whole 12 2,405/2,513 0.8326× 1.4121× 1.1757×
heading-reference-grammar-v2 ASCII whole 12 2,140/3,198 1.1580× 0.6545× 0.7579×
image-dimensions-grammar-v2 ASCII local 12 378/378 1.0000× 1.5793× 1.5793×
inline-directive-grammar-v2 ASCII whole 12 1,491/1,515 1.0641× 1.3888× 1.4778×
inline-footnote-grammar-v2 ASCII whole 12 1,467/1,539 1.0325× 1.3860× 1.4310×
insertion-strong-grammar-v2 ASCII whole 12 1,479/1,479 0.9976× 1.4395× 1.4361×
leaf-comment-grammar-v2 ASCII whole 12 333/357 1.2159× 1.3625× 1.6567×
leaf-directive-grammar-v2 ASCII whole 12 1,383/1,395 1.0531× 1.2740× 1.3417×
leaf-fence-grammar-v2 ASCII whole 12 441/357 1.2739× 1.3625× 1.7358×
leaf-formula-grammar-v2 ASCII whole 12 333/357 1.0049× 1.3625× 1.3692×
loose-definition-grammar-v2 ASCII whole 12 1,596/1,620 1.0403× 1.5229× 1.5843×
mark-formatting-grammar-v2 ASCII whole 12 1,479/1,479 0.9996× 1.4395× 1.4390×
metadata-grammar-v2 ASCII local 12 1,469/1,469 1.0000× 1.4743× 1.4743×
metadata-literal-grammar-v2 ASCII local 12 1,754/1,754 1.0000× 1.4980× 1.4980×
metadata-types-grammar-v2 ASCII local 12 1,541/1,541 1.0000× 1.5015× 1.5015×
metadataempty-grammar-v2 ASCII local 12 1,541/1,541 1.0000× 1.5015× 1.5015×
mixed-definitions-grammar-v2 ASCII whole 12 2,795/3,047 0.9565× 1.5745× 1.5060×
named-container-grammar-v2 ASCII whole 12 2,417/2,441 0.9425× 1.5412× 1.4526×
opaque-comment-grammar-v2 ASCII whole 12 429/429 0.9376× 1.5552× 1.4581×
opaque-display-grammar-v2 ASCII whole 12 429/429 1.0082× 1.5552× 1.5679×
opaque-formula-grammar-v2 ASCII whole 12 405/405 1.0177× 1.5630× 1.5907×
record-span-grammar-v2 ASCII whole 12 1,649/1,661 1.0257× 1.3917× 1.4275×
roman-list-grammar-v2 ASCII whole 26 5,628/5,596 1.0164× 1.4259× 1.4493×
run-insertion-grammar-v2 ASCII whole 12 429/429 0.9986× 1.5490× 1.5469×
run-mark-grammar-v2 ASCII whole 12 429/429 0.9986× 1.5490× 1.5469×
run-strike-grammar-v2 ASCII whole 12 429/429 0.9971× 1.5490× 1.5445×
run-sub-grammar-v2 ASCII whole 12 278/278 0.9951× 1.4863× 1.4790×
run-super-grammar-v2 ASCII whole 12 278/278 1.0005× 1.4863× 1.4871×
script-empty-grammar-v2 ASCII whole 12 192/288 0.9389× 1.5508× 1.4560×
script-escaped-space-grammar-v2 ASCII whole 12 326/374 0.9548× 1.3616× 1.3000×
script-formatting-grammar-v2 ASCII whole 12 216/240 1.1336× 1.5075× 1.7088×
span-empty-grammar-v2 ASCII whole 12 314/314 1.0186× 1.5239× 1.5523×
span-nested-grammar-v2 ASCII whole 12 1,601/1,601 1.0346× 1.3794× 1.4271×
specimen-graph-grammar-v2 ASCII whole 12 3,581/3,593 0.9272× 0.8146× 0.7552×
specimen-groups-grammar-v2 ASCII whole 12 7,022/7,034 0.9652× 1.2111× 1.1690×
specimen-reset-grammar-v2 ASCII whole 12 3,629/4,699 0.8572× 1.0339× 0.8863×
task-heading-grammar-v2 ASCII whole 12 1,407/1,359 1.0103× 1.9851× 2.0056×
task-nested-grammar-v2 ASCII whole 12 2,477/2,477 1.0000× 1.0243× 1.0243×
task-unicode-grammar-v2 ASCII whole 12 1,407/1,383 1.0019× 1.0257× 1.0276×
task-value-grammar-v2 ASCII whole 12 2,429/2,429 1.0000× 1.0337× 1.0337×
topic-grammar-v2 ASCII whole 12 180/192 0.9305× 1.6774× 1.5608×
upper-list-grammar-v2 ASCII whole 26 5,631/5,596 1.0047× 1.4259× 1.4326×
upper-roman-list-grammar-v2 ASCII whole 26 5,628/5,596 1.0161× 1.4259× 1.4488×
alpha-list-grammar-v2 UTF-8 whole 26 12,810/12,827 1.0015× 1.2329× 1.2347×
anchor-grammar-v2 UTF-8 whole 12 4,121/4,229 0.9161× 0.9924× 0.9092×
anchor-last-empty-grammar-v2 UTF-8 whole 12 734/650 1.0057× 1.4410× 1.4493×
anonymous-container-grammar-v2 UTF-8 whole 12 5,534/5,462 1.0537× 1.2630× 1.3308×
attribute-autolink-grammar-v2 UTF-8 whole 12 838/910 0.7689× 1.4159× 1.0888×
attribute-bare-grammar-v2 UTF-8 whole 12 276/480 0.9517× 1.4681× 1.3972×
attribute-code-grammar-v2 UTF-8 whole 12 1,275/1,335 0.8364× 1.3369× 1.1182×
attribute-double-grammar-v2 UTF-8 whole 12 3,641/3,653 1.0556× 1.1945× 1.2610×
attribute-empty-grammar-v2 UTF-8 whole 12 288/300 0.9942× 1.5203× 1.5115×
attribute-escaped-value-grammar-v2 UTF-8 whole 12 722/734 0.9591× 1.3892× 1.3324×
attribute-fence-grammar-v2 UTF-8 whole 12 1,287/1,359 0.5365× 1.2692× 0.6809×
attribute-heading-grammar-v2 UTF-8 whole 12 3,581/3,569 1.0346× 1.5431× 1.5964×
attribute-image-grammar-v2 UTF-8 whole 12 3,793/3,865 0.9728× 1.2977× 1.2625×
attribute-link-grammar-v2 UTF-8 whole 12 3,781/3,853 0.9709× 1.2161× 1.1807×
attribute-newline-grammar-v2 UTF-8 whole 12 722/686 1.0802× 1.5176× 1.6394×
attribute-order-grammar-v2 UTF-8 whole 12 1,074/934 0.9999× 1.4328× 1.4327×
attribute-reference-grammar-v2 UTF-8 whole 12 5,978/5,930 1.0345× 0.6801× 0.7036×
attribute-single-grammar-v2 UTF-8 whole 12 3,641/3,653 1.0557× 1.1945× 1.2610×
attribute-unquoted-grammar-v2 UTF-8 whole 12 3,617/3,653 1.0546× 1.1945× 1.2597×
block-id-container-list-grammar-v2 UTF-8 whole 12 4,121/4,217 0.9200× 1.0027× 0.9224×
block-id-container-table-grammar-v2 UTF-8 whole 12 1,776/1,872 0.8735× 0.6913× 0.6038×
block-id-escaped-grammar-v2 UTF-8 whole 12 204/204 1.0000× 1.4474× 1.4474×
block-id-list-grammar-v2 UTF-8 whole 12 5,255/5,423 0.8340× 0.8635× 0.7202×
block-id-paragraph-grammar-v2 UTF-8 whole 12 4,085/4,205 0.8399× 0.9785× 0.8219×
callout-grammar-v2 UTF-8 whole 12 3,131/3,231 1.0477× 1.0489× 1.0989×
citation-affixes-grammar-v2 UTF-8 whole 12 1,287/1,311 1.2606× 1.3573× 1.7110×
citation-group-grammar-v2 UTF-8 whole 12 416/656 0.9738× 1.4905× 1.4515×
cite-author-grammar-v2 UTF-8 whole 12 216/324 1.0677× 1.5289× 1.6324×
cite-normal-grammar-v2 UTF-8 whole 12 240/324 1.2303× 1.5289× 1.8810×
cite-suppress-grammar-v2 UTF-8 whole 12 228/324 1.0477× 1.5289× 1.6018×
class-span-grammar-v2 UTF-8 whole 12 554/554 0.9878× 1.4161× 1.3989×
comment-empty-grammar-v2 UTF-8 whole 12 252/264 1.0232× 1.5348× 1.5704×
common-anchor-generation-grammar-v2 UTF-8 whole 12 420/420 1.0000× 2.1089× 2.1089×
common-angle-autolink-grammar-v2 UTF-8 whole 12 722/722 1.0000× 1.4490× 1.4490×
common-atx-1-grammar-v2 UTF-8 whole 12 3,087/3,087 1.0000× 1.9119× 1.9119×
common-atx-2-grammar-v2 UTF-8 whole 12 3,099/3,099 1.0000× 1.9109× 1.9109×
common-atx-3-grammar-v2 UTF-8 whole 12 3,111/3,111 1.0000× 1.9096× 1.9096×
common-atx-4-grammar-v2 UTF-8 whole 12 3,123/3,123 1.0000× 1.9083× 1.9083×
common-atx-5-grammar-v2 UTF-8 whole 12 3,135/3,135 1.0000× 1.9073× 1.9073×
common-atx-6-grammar-v2 UTF-8 whole 12 3,147/3,147 1.0000× 1.9060× 1.9060×
common-bullet-dash-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2680× 1.2680×
common-bullet-plus-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2626× 1.2626×
common-bullet-star-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2643× 1.2643×
common-code-fence-backtick-grammar-v2 UTF-8 whole 12 829/829 1.0000× 1.2138× 1.2138×
common-code-fence-tilde-grammar-v2 UTF-8 whole 12 829/829 1.0000× 1.2139× 1.2139×
common-code-newline-grammar-v2 UTF-8 whole 12 590/590 1.0000× 1.4615× 1.4615×
common-code-span-grammar-v2 UTF-8 whole 12 710/710 1.0000× 1.4866× 1.4866×
common-emphasis-asterisk-grammar-v2 UTF-8 whole 12 850/850 1.0000× 1.3901× 1.3901×
common-emphasis-underscore-grammar-v2 UTF-8 whole 12 850/850 1.0000× 1.3903× 1.3903×
common-entities-grammar-v2 UTF-8 whole 12 1,046/1,046 1.0000× 0.9937× 0.9937×
common-eol-cr-grammar-v2 UTF-8 whole 12 3,449/3,449 1.0000× 1.2517× 1.2517×
common-eol-crlf-grammar-v2 UTF-8 whole 12 3,485/3,485 1.0000× 1.2768× 1.2768×
common-eol-lf-grammar-v2 UTF-8 whole 12 3,449/3,449 1.0000× 1.2518× 1.2518×
common-escapes-grammar-v2 UTF-8 whole 12 698/698 1.0000× 1.0375× 1.0375×
common-hardbreak-backslash-grammar-v2 UTF-8 whole 12 5,402/5,402 1.0000× 1.2044× 1.2044×
common-hardbreak-spaces-grammar-v2 UTF-8 whole 12 5,414/5,414 1.0000× 1.1986× 1.1986×
common-html-block-tag-grammar-v2 UTF-8 whole 12 240/240 1.0000× 1.3480× 1.3480×
common-html-cdata-grammar-v2 UTF-8 whole 12 228/228 1.0000× 1.3491× 1.3491×
common-html-comment-grammar-v2 UTF-8 whole 12 793/793 1.0000× 1.4755× 1.4755×
common-html-complete-tag-grammar-v2 UTF-8 whole 12 324/324 1.0000× 1.3092× 1.3092×
common-html-declaration-grammar-v2 UTF-8 whole 12 216/216 1.0000× 1.3414× 1.3414×
common-html-instruction-grammar-v2 UTF-8 whole 12 264/264 1.0000× 1.3263× 1.3263×
common-html-raw-grammar-v2 UTF-8 whole 12 312/312 1.0000× 1.2810× 1.2810×
common-image-grammar-v2 UTF-8 whole 12 3,733/3,733 1.0000× 1.2845× 1.2845×
common-indented-code-grammar-v2 UTF-8 whole 12 554/554 1.0000× 1.3930× 1.3930×
common-inline-comment-grammar-v2 UTF-8 whole 12 913/913 1.0000× 1.4229× 1.4229×
common-inline-html-grammar-v2 UTF-8 whole 12 3,507/3,507 1.0000× 1.2291× 1.2291×
common-link-direct-grammar-v2 UTF-8 whole 12 3,721/3,721 1.0000× 1.1969× 1.1969×
common-list-loose-grammar-v2 UTF-8 whole 12 5,522/5,522 1.0000× 1.2776× 1.2776×
common-list-parenthesis-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2630× 1.2630×
common-paragraph-grammar-v2 UTF-8 whole 12 5,570/5,570 1.0000× 1.2996× 1.2996×
common-quote-grammar-v2 UTF-8 whole 12 5,546/5,546 1.0000× 1.2562× 1.2562×
common-reference-collapsed-grammar-v2 UTF-8 whole 12 2,900/2,900 1.0000× 0.5385× 0.5385×
common-reference-duplicate-grammar-v2 UTF-8 whole 12 3,847/3,847 1.0000× 0.4430× 0.4430×
common-reference-full-grammar-v2 UTF-8 whole 12 5,903/5,903 1.0000× 0.7034× 0.7034×
common-reference-shortcut-grammar-v2 UTF-8 whole 12 2,876/2,876 1.0000× 0.5398× 0.5398×
common-setext-one-grammar-v2 UTF-8 whole 12 5,438/5,438 1.0000× 1.8580× 1.8580×
common-setext-two-grammar-v2 UTF-8 whole 12 5,438/5,438 1.0000× 1.8580× 1.8580×
common-softbreak-grammar-v2 UTF-8 whole 12 5,390/5,390 1.0000× 1.2010× 1.2010×
common-tabs-grammar-v2 UTF-8 whole 12 3,147/3,147 1.0000× 1.2889× 1.2889×
common-thematic-dash-grammar-v2 UTF-8 whole 12 5,486/5,486 1.0000× 1.2552× 1.2552×
common-thematic-star-grammar-v2 UTF-8 whole 12 5,486/5,486 1.0000× 1.2535× 1.2535×
common-thematic-underscore-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0000× 1.2536× 1.2536×
common-unresolved-reference-grammar-v2 UTF-8 whole 12 3,279/3,279 1.0000× 1.0992× 1.0992×
composition-directive-callout-grammar-v2 UTF-8 whole 12 3,255/3,243 0.9212× 1.3041× 1.2013×
composition-literal-islands-grammar-v2 UTF-8 whole 12 746/746 0.9989× 1.4429× 1.4414×
cross-anchor-grammar-v2 UTF-8 whole 12 407/419 0.8812× 1.4656× 1.2916×
cross-block-anchor-grammar-v2 UTF-8 whole 12 419/431 0.8839× 1.4623× 1.2925×
cross-embed-grammar-v2 UTF-8 whole 12 1,005/1,041 0.8789× 1.3606× 1.1958×
cross-embed-absent-grammar-v2 UTF-8 whole 12 332/344 0.8413× 1.5206× 1.2792×
cross-embed-empty-grammar-v2 UTF-8 whole 12 344/380 0.8387× 1.4887× 1.2485×
cross-embed-table-grammar-v2 UTF-8 whole 12 4,104/4,092 0.9887× 0.9563× 0.9455×
cross-link-grammar-v2 UTF-8 whole 12 993/1,029 0.8726× 1.3620× 1.1885×
cross-link-absent-grammar-v2 UTF-8 whole 12 320/332 0.8372× 1.5224× 1.2745×
cross-link-empty-grammar-v2 UTF-8 whole 12 332/368 0.8315× 1.4929× 1.2413×
cross-link-table-grammar-v2 UTF-8 whole 12 4,092/4,080 0.9957× 0.9541× 0.9499×
cross-local-grammar-v2 UTF-8 whole 12 279/291 0.8732× 1.5350× 1.3404×
cross-raw-label-grammar-v2 UTF-8 whole 12 399/423 0.8671× 1.4774× 1.2811×
decimal-list-grammar-v2 UTF-8 whole 12 5,469/5,469 1.0000× 1.2635× 1.2635×
default-list-grammar-v2 UTF-8 whole 12 5,462/5,462 1.0015× 1.2638× 1.2657×
definition-blocks-grammar-v2 UTF-8 whole 12 5,558/5,558 1.0389× 1.2974× 1.3479×
directive-attribute-only-grammar-v2 UTF-8 whole 12 602/650 0.9093× 1.4410× 1.3103×
directive-both-parts-grammar-v2 UTF-8 whole 12 3,629/3,653 1.1350× 1.1945× 1.3558×
directive-leaf-bare-grammar-v2 UTF-8 whole 12 108/144 0.4859× 1.4072× 0.6838×
directive-nested-grammar-v2 UTF-8 whole 12 3,665/3,617 0.8696× 1.3309× 1.1573×
directive-unbraced-grammar-v2 UTF-8 whole 12 3,243/3,171 0.9217× 1.2881× 1.1873×
directive-unicode-grammar-v2 UTF-8 whole 12 3,593/3,617 1.0484× 1.1890× 1.2465×
embed-dimensions-grammar-v2 UTF-8 local 12 885/885 1.0000× 1.4306× 1.4306×
empty-directive-grammar-v2 UTF-8 whole 12 240/264 1.0561× 1.5516× 1.6386×
enclosed-default-list-grammar-v2 UTF-8 whole 12 5,486/5,462 1.0020× 1.2631× 1.2656×
fallback-footnote-grammar-v2 UTF-8 whole 12 240/240 1.0000× 1.1826× 1.1826×
fallback-list-limit-grammar-v2 UTF-8 whole 12 3,171/3,171 1.0000× 1.2290× 1.2290×
fallback-strike-grammar-v2 UTF-8 whole 12 3,171/3,171 1.0000× 0.9611× 0.9611×
fallback-task-separator-grammar-v2 UTF-8 whole 12 862/862 1.0000× 1.1416× 1.1416×
footnote-nested-inline-grammar-v2 UTF-8 whole 12 778/778 1.1058× 1.4072× 1.5560×
footnote-retention-grammar-v2 UTF-8 whole 12 11,825/11,825 1.0000× 0.8131× 0.8131×
formula-backtick-grammar-v2 UTF-8 whole 12 853/829 1.0150× 1.4041× 1.4251×
formula-bracket-grammar-v2 UTF-8 whole 12 877/829 1.2890× 1.4041× 1.8099×
formula-bracket-block-grammar-v2 UTF-8 whole 12 781/781 1.0180× 1.2396× 1.2619×
formula-parenthesis-grammar-v2 UTF-8 whole 12 877/829 1.2925× 1.4041× 1.8148×
gfm-bare-autolink-grammar-v2 UTF-8 whole 12 971/971 1.0000× 1.0376× 1.0376×
gfm-footnote-grammar-v2 UTF-8 whole 12 5,377/5,377 1.0000× 0.8636× 0.8636×
gfm-footnote-blocks-grammar-v2 UTF-8 whole 12 7,800/7,800 1.0000× 0.8991× 0.8991×
gfm-footnote-cycle-grammar-v2 UTF-8 whole 12 6,432/6,432 1.0000× 0.8323× 0.8323×
gfm-pipe-ragged-grammar-v2 UTF-8 whole 12 1,174/1,174 1.0000× 0.8127× 0.8127×
gfm-pipe-table-grammar-v2 UTF-8 whole 12 5,938/5,938 1.0000× 0.9256× 0.9256×
gfm-strike-grammar-v2 UTF-8 whole 12 3,195/3,195 1.0000× 0.9781× 0.9781×
gfm-task-lower-grammar-v2 UTF-8 whole 12 3,099/3,099 1.0000× 1.0090× 1.0090×
gfm-task-open-grammar-v2 UTF-8 whole 12 3,099/3,099 1.0000× 0.9974× 0.9974×
gfm-task-upper-grammar-v2 UTF-8 whole 12 3,099/3,099 1.0000× 1.0021× 1.0021×
heading-explicit-id-grammar-v2 UTF-8 whole 12 4,154/4,262 0.8631× 1.2294× 1.0610×
heading-reference-grammar-v2 UTF-8 whole 12 2,206/3,297 1.1080× 0.4917× 0.5448×
image-dimensions-grammar-v2 UTF-8 local 12 885/885 1.0000× 1.4306× 1.4306×
inline-directive-grammar-v2 UTF-8 whole 12 3,243/3,267 1.0728× 1.2105× 1.2987×
inline-footnote-grammar-v2 UTF-8 whole 12 3,183/3,255 1.0267× 1.2116× 1.2439×
insertion-strong-grammar-v2 UTF-8 whole 12 3,195/3,195 0.9976× 1.2350× 1.2320×
leaf-comment-grammar-v2 UTF-8 whole 12 757/781 1.2110× 1.2396× 1.5012×
leaf-directive-grammar-v2 UTF-8 whole 12 3,135/3,147 1.1510× 1.0332× 1.1893×
leaf-fence-grammar-v2 UTF-8 whole 12 865/781 1.2959× 1.2396× 1.6064×
leaf-formula-grammar-v2 UTF-8 whole 12 757/781 1.0051× 1.2396× 1.2460×
loose-definition-grammar-v2 UTF-8 whole 12 3,736/3,760 1.0649× 1.2706× 1.3530×
mark-formatting-grammar-v2 UTF-8 whole 12 3,195/3,195 0.9996× 1.2350× 1.2345×
metadata-grammar-v2 UTF-8 local 12 3,425/3,425 1.0000× 1.2582× 1.2582×
metadata-literal-grammar-v2 UTF-8 local 12 4,134/4,134 1.0000× 1.2696× 1.2696×
metadata-types-grammar-v2 UTF-8 local 12 3,533/3,533 1.0000× 1.3061× 1.3061×
metadataempty-grammar-v2 UTF-8 local 12 3,533/3,533 1.0000× 1.3061× 1.3061×
mixed-definitions-grammar-v2 UTF-8 whole 12 6,494/6,746 0.9601× 1.3730× 1.3182×
named-container-grammar-v2 UTF-8 whole 12 5,558/5,582 0.9449× 1.2956× 1.2242×
opaque-comment-grammar-v2 UTF-8 whole 12 853/853 0.9144× 1.4029× 1.2828×
opaque-display-grammar-v2 UTF-8 whole 12 853/853 0.9979× 1.4029× 1.4000×
opaque-formula-grammar-v2 UTF-8 whole 12 829/829 1.0074× 1.4041× 1.4145×
record-span-grammar-v2 UTF-8 whole 12 3,641/3,653 1.0556× 1.1945× 1.2610×
roman-list-grammar-v2 UTF-8 whole 26 12,859/12,827 1.0168× 1.2329× 1.2536×
run-insertion-grammar-v2 UTF-8 whole 12 853/853 0.9986× 1.3921× 1.3902×
run-mark-grammar-v2 UTF-8 whole 12 853/853 0.9986× 1.3921× 1.3902×
run-strike-grammar-v2 UTF-8 whole 12 853/853 0.9971× 1.3921× 1.3880×
run-sub-grammar-v2 UTF-8 whole 12 518/518 0.9886× 1.4475× 1.4310×
run-super-grammar-v2 UTF-8 whole 12 518/518 0.9938× 1.4475× 1.4385×
script-empty-grammar-v2 UTF-8 whole 12 228/324 0.9383× 1.5342× 1.4396×
script-escaped-space-grammar-v2 UTF-8 whole 12 602/650 0.9516× 1.3126× 1.2490×
script-formatting-grammar-v2 UTF-8 whole 12 252/276 1.1324× 1.4830× 1.6792×
span-empty-grammar-v2 UTF-8 whole 12 554/554 0.9878× 1.4161× 1.3989×
span-nested-grammar-v2 UTF-8 whole 12 3,557/3,557 1.0660× 1.1935× 1.2723×
specimen-graph-grammar-v2 UTF-8 whole 12 5,365/5,377 0.9261× 0.8649× 0.8010×
specimen-groups-grammar-v2 UTF-8 whole 12 11,942/11,954 0.9623× 0.9735× 0.9368×
specimen-reset-grammar-v2 UTF-8 whole 12 5,411/6,514 0.8554× 0.8118× 0.6944×
task-heading-grammar-v2 UTF-8 whole 12 3,123/3,075 1.0108× 1.9006× 1.9212×
task-nested-grammar-v2 UTF-8 whole 12 5,582/5,582 1.0000× 0.9953× 0.9953×
task-unicode-grammar-v2 UTF-8 whole 12 3,123/3,099 1.0019× 1.0090× 1.0109×
task-value-grammar-v2 UTF-8 whole 12 5,534/5,534 1.0000× 1.0054× 1.0054×
topic-grammar-v2 UTF-8 whole 12 216/228 0.9320× 1.6144× 1.5047×
upper-list-grammar-v2 UTF-8 whole 26 12,862/12,827 1.0048× 1.2329× 1.2389×
upper-roman-list-grammar-v2 UTF-8 whole 26 12,859/12,827 1.0164× 1.2329× 1.2531×
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.0438× 243
fallback-comment-grammar-v2 ASCII percent-comment 12 1.1433× 4,426
fallback-cross-link-grammar-v2 ASCII cross-link 12 1.1436× 1,047
fallback-directive-grammar-v2 ASCII inline-directive 12 1.2420× 1,323
fallback-formula-grammar-v2 ASCII inline-formula 12 1.1689× 5,215
fallback-image-dimensions-grammar-v2 ASCII image-dimensions 12 1.0006× 6
fallback-insertion-grammar-v2 ASCII insertion 12 1.0612× 1,891
fallback-mark-grammar-v2 ASCII mark 12 1.0612× 1,891
fallback-noninitial-metadata-grammar-v2 ASCII metadata-envelope 12 no control —
fallback-script-grammar-v2 ASCII superscript 12 1.6439× 3,564
fallback-span-grammar-v2 ASCII bracketed-span 12 1.0291× 1,001
fallback-topic-grammar-v2 ASCII topic 12 1.0523× 287
fallback-attributes-grammar-v2 UTF-8 attribute-block 12 1.0602× 2,047
fallback-citation-grammar-v2 UTF-8 citation 12 1.0441× 240
fallback-comment-grammar-v2 UTF-8 percent-comment 12 1.2577× 7,713
fallback-cross-link-grammar-v2 UTF-8 cross-link 12 1.1661× 1,199
fallback-directive-grammar-v2 UTF-8 inline-directive 12 1.2454× 1,320
fallback-formula-grammar-v2 UTF-8 inline-formula 12 1.3127× 9,356
fallback-image-dimensions-grammar-v2 UTF-8 image-dimensions 12 1.0006× 6
fallback-insertion-grammar-v2 UTF-8 insertion 12 1.0639× 1,914
fallback-mark-grammar-v2 UTF-8 mark 12 1.0639× 1,914
fallback-noninitial-metadata-grammar-v2 UTF-8 metadata-envelope 12 no control —
fallback-script-grammar-v2 UTF-8 superscript 12 1.6843× 3,844
fallback-span-grammar-v2 UTF-8 bracketed-span 12 1.0616× 2,082
fallback-topic-grammar-v2 UTF-8 topic 12 1.0814× 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 590083233568): 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 253,290 772,733 1,527,678 48,897,157,566 33,805 121,882 506,615 5,328,622,850 0.207× 2.794× 140,472,554
Grammar corpus scalars 384 279,626 200,218 607,951 1,527,470 70,093,394,913 21,706 36,702 218,929 1,338,757,550 0.301× 2.258× 140,472,554

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,542 167,947 296,444 8,457,227,294 1.587×
Grammar corpus scalars 18,255 58,839 122,239 1,449,802,613 1.083×

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 383,484 838,380 1,531,870 8,853,074,431 118,826 284,090 695,708 2,733,254,028
Grammar corpus lines 1,152 6,066 6,066 391,218 868,150 1,532,606 2,245,669,335 43,258 632,567 1,966,101 796,475,890
Grammar corpus markers 384 6,912 6,912 369,644 816,613 1,536,952 2,417,069,111 63,603 566,407 1,844,221 987,718,470
Grammar corpus ranges 384 3,840 3,840 831,454 1,399,089 2,230,887 3,458,076,343 80,243 1,090,755 2,174,696 708,750,360
Grammar corpus far 384 24,576 24,576 385,653 865,569 1,533,149 9,117,540,147 36,320 726,867 1,960,009 3,378,300,042
Grammar corpus random 384 23,926 23,926 57,802 521,684 1,531,735 3,126,235,913 32,440 210,180 1,234,818 1,445,486,525

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 100,904 706,027 3,875,508 484,563 222,729
Shapes, 16 KiB 1 ms 34 402 1 2,906 154,699 7,386,082 31,777,743 4,985,859 2,598,898
Shapes, 64 KiB 10 ms 40 184 0 1,376 189,255 24,408,877 52,271,686 11,825,752 12,345,545
Shapes, 256 KiB 10 ms 34 136 0 1,088 191,968 51,330,744 194,042,621 25,097,996 37,985,363

The widths of the root's children, the nests below it, the reach of a
node and the readings-past query move from elements/session.c to
core/index.{h,c} (markdown_core_index). The session keeps the index in
its edit state and only calls it: make, mend, mend the chain's nests,
find a nest, its fold marks, and crossed. The walk check of the root's
children stays in the session, as the walk is the AST's.

The kept child before an edit's first now adds its own readings to its
reach rather than walking its whole subtree again: only its own grew,
unless it is the chain's, whose nest is mended (an edit after a long
blockquote no longer costs the blockquote).

Also formats parser.h, and lists index.c for the Swift, Kotlin and ES
builds.

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

This branch has not been deployed

No deployments
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