Repository navigation
v0.8.0
Patternia v0.8.0
Release Date: February 27, 2026
Type: API + Performance Release
Highlights
- Removed legacy terminal API (breaking):
match(x, cases(...)).end()
- Standardized recommended syntax:
match(x) | on{ ... };
- Introduced tiered variant dispatch:
hot_inline(small branch sets)warm_segmented(medium branch sets)cold_compact(large branch sets)
- Added compact index mapping and cold-path separation for large branch counts.
- Documentation updates:
- Refreshed v0.8.0 performance snapshot in
README.md - Added/updated performance notes under
docs/performance - Synced changelog and release index for 0.8.0
- Refreshed v0.8.0 performance snapshot in
Breaking Changes
Removed:
match(x, cases(...)).end()
Migration
Before
auto r = match(x, cases(
lit(1) >> [] { return 1; },
__ >> [] { return 0; }
)).end();After
auto r = match(x) | on{
lit(1) >> [] { return 1; },
__ >> [] { return 0; }
};Performance Notes
v0.8.0 focuses on variant dispatch improvements:
- Inline-oriented fast path for small alternative counts
- Segmented dispatch for medium alternative counts
- Compact-map + cold-path strategy for large alternative counts
- Per-alt narrowing in typed-variant dispatch to reduce irrelevant case scanning
Bench & Tooling
- Use
ptn_bench_variantfor variant-focused profiling. - Generate single-JSON visualization with
scripts/bench_single_report.py. README.mdnow includes benchmark intent, code shape, and interpretation for each variant benchmark group.
Compatibility
match(x) | on{...}remains the primary supported path.- Chained
.when(...).end()and.otherwise(...)are still available but marked as deprecating.
Full Changelog
docs/changelog/v0.8.0.mddocs/changelog/releases.md