Skip to content

0.4.0 - the benchmark release

Latest

Choose a tag to compare

@nhannht nhannht released this 08 Aug 17:57
· 28 commits to master since this release

The benchmark release. organism is now, measurably, the fastest full-fidelity org parser: the only parser measured, other than org-element itself, that reproduces org-element's tree node for node - 121/121 conformance cases, 28/28 real-world files, 1,505/1,505 generated sweep cases - at 9 times org-element's speed at the real-corpus median. Speed and accuracy tables, protocol, fairness rules and receipts: BENCHMARKS.md.

Added

  • Zero construct refusals. Emacs's [:alnum:] and [:word:] classes are enumerated over the full Unicode scalar space in a live org buffer, so the last nine refusal sites became decidable and their throwing guards are gone. SweepTests.knownRefusals is the empty set, re-counted on every run. The depth limit remains.
  • #+LINK: abbreviation expansion, matching org's semantics (case-sensitive keys, last declaration wins, %s/%h templates, %(fn) never expands).
  • Spans on the typed tree: OrgSpan, a span slot on every generated node, and patch helpers. Span recording covers 6 of 55 construction sites so far.
  • A published benchmark: bench/ measures organism, orgize, go-org, uniorg and org-element on identical bytes; bench/accuracy/ grades all five against org-element's own answers through per-competitor adapters bound by written fairness rules.

Changed

  • Roughly an order of magnitude faster than 0.3.1, landed as measured per-commit steps: single-pass fast path, one flat scalar buffer with zero-copy line views, a slice-based object layer, ASCII lanes in the scalar predicates, bitmask container checks, and native typed-tree construction. OrgDocument(parsing:) is the zero-JSON path.

Fixed

  • blockValue fabricated a trailing newline at EOF (latex-environment reachable).
  • The plain-link word boundary is a measured table (3,559 suppressing scalars in 366 ranges), not a heuristic.
  • Literal block values comma-unescape the way org does; the renderer restores the escape exactly.
  • An item's extent no longer leaks into a paired block, dynamic-block or drawer body.
  • Headline tags, drawer names and citation keys consult the measured Emacs class tables; the timestamp matcher transcribes org's lax envelope-plus-scrape algorithm.

Notes for consumers

API is additive only. Inputs that used to throw the nine class refusals now return org's tree. parseOrg still throws on a CR byte and on nesting past the depth limit.

Full details: CHANGELOG.md.