Files
scriptc/benchmarks/regions

Lifetime-region benchmarks

Programs that build generations of ProgramLifetime objects and free each generation with a LifetimeRegion (@scriptc/experimental). Every variant prints the same result line before its timings.

Program Shape
generations.ts Per-file syntax trees and binder symbols in one region per file, checker state (types, signatures, node and symbol links in paged tables, literal and union caches) in one region per generation. edit re-parses one file per generation, all re-parses every file.
compiler.ts A tokenizer, recursive-descent parser, binder and checker over generated sources, rebuilt from scratch in one region per build, like a watch mode that does not reuse syntax trees.
$ node benchmarks/regions/run.mjs --baseline=../scriptc-main --runs=7

Each configuration is timed in five variants, interleaved: on (ProgramLifetime classes, no regions), off (the same classes without implements ProgramLifetime), region, region-plain (the region build run without constructing a region, which measures what supporting regions costs a one-shot run) and Node.js. --baseline builds on and off with another checkout.