Skip to content
Lightning YAML
Search
Ctrl
K
Cancel
GitHub
Select theme
Dark
Light
Auto
Menu
Guides
Getting Started
Parsing YAML
Stringifying YAML
Playground
Benchmarks
Research
notes
Optimization index
Adversarial torture tests — parser differentials, breakage & spec corners (2026-07-13)
Adversarial verification verdicts
Completeness critique: gaps in the lightning-yaml research + designs (ranked)
lightning-yaml v1 design — a single-pass, allocation-minimal, pure-JS YAML parser engineered for V8
lightning-yaml Design Brief B: WASM-wrapped rapidyaml with in-WASM YAML→JSON transcode + native JSON.parse
Design C — Pragmatic hybrid: JSON.parse delegation + tiered fast-path routing inside a single-pass pure-JS YAML parser
Deep-dive: yaml (eemeli/yaml) v2.9.0 — pipeline anatomy, allocation profile, and why it loses to js-yaml
js-yaml loader deep-dive (installed: js-yaml@4.3.0, NOT 4.1.0)
Empirical calibration: lightning-yaml target machine
How fast can pure JS go on V8 — evidence for lightning-yaml's design
V8's JSON.parse: source anatomy, techniques, and what a pure-JS YAML parser can borrow
V8 Optimization Guide
WASM route for lightning-yaml: wrap a native YAML parser as a WASM npm package
V8 JIT tier-residency and deopt audit of the hot parse + dump paths
Columnar (struct-of-arrays) storage behind a proxy facade
Object.freeze on parsed output
Interning repeated string *values* during parse
Using string length as a pre-parse heuristic
Parsing multiline block scalars: first baseline, and a faster accumulator
Hand-rolling number conversion in the parse path
The fixed per-call overhead of parsing a tiny document
Shape-specialized codegen: the ceiling for a compiled stringify
A one-scan PLAIN/SINGLE/DOUBLE scalar classifier for stringify
Hand-optimizing formatNumber in stringify
Caching rendered map keys in stringify
Skipping the ref-scan with a single-pass, restart-on-share dumper
Replacing the ConsString rope with an array-of-chunks + join
Runtime shape-codegen and record-structure techniques from binary and schema serializers
The shape of real-world YAML: what to optimize the hot path for
Peer YAML libraries: how schema and options change typing, compliance, and cost (js-yaml 5.2.1, yaml 2.9.0)
Building mapping objects with a fixed shape: how much memory does it actually save?
Research Overview
Tokenizer & Scanning
Allocation Strategy & V8 Friendliness
Benchmark & test methodology
API reference
Overview
index
Overview
Classes
NotImplementedError
YAMLParseError
Interfaces
ParseOptimizations
ParseOptions
Functions
parse
parseAll
stringify
js-yaml-compat
Overview
Classes
Schema
YAMLException
Interfaces
DumpOptions
LoadOptions
Mark
TagDefinition
Variables
CORE_SCHEMA
default
FAILSAFE_SCHEMA
JSON_SCHEMA
YAML11_SCHEMA
Functions
defineMappingTag
defineScalarTag
defineSequenceTag
dump
load
loadAll
yaml-compat
Overview
Namespaces
CST
functions
createScalarToken
isCollection
isScalar
prettyToken
resolveAsScalar
setScalarValue
stringify
tokenType
visit
interfaces
BlockMap
BlockScalar
BlockSequence
Directive
Document
DocumentEnd
ErrorToken
FlowCollection
FlowScalar
SourceToken
CST
type-aliases
CollectionItem
Token
TokenType
Visitor
VisitPath
variables
BOM
DOCUMENT
FLOW_END
SCALAR
Classes
Lexer
LineCounter
Parser
Interfaces
CompatDocument
Type Aliases
Reviver
Variables
default
Functions
parse
parseAllDocuments
parseDocument
stringify
References
CSTSourceToken
CSTToken
GitHub
Select theme
Dark
Light
Auto
CST
Interfaces
Section titled “Interfaces”
BlockMap
BlockScalar
BlockSequence
Directive
Document
DocumentEnd
ErrorToken
FlowCollection
FlowScalar
SourceToken
Type Aliases
Section titled “Type Aliases”
CollectionItem
Token
TokenType
Visitor
VisitPath
Variables
Section titled “Variables”
BOM
DOCUMENT
FLOW_END
SCALAR
Functions
Section titled “Functions”
createScalarToken
isCollection
isScalar
prettyToken
resolveAsScalar
setScalarValue
stringify
tokenType
visit