Skip to content

Patternia v0.7.6 Release Note

Release Date: February 21, 2026
Version: 0.7.6


Overview

Patternia v0.7.6 is a performance and benchmarking release focused on variant dispatch internals, practical benchmark coverage, and easier benchmark result visualization.

Compared with v0.7.5, this version adds targeted fast paths for variant matching (including mixed simple + guarded patterns), introduces real-world benchmark scenarios, and streamlines single-file benchmark reporting.


Highlights

Variant Dispatch Performance (Core)

  • Added a single-dispatch fast path for simple variant cases.
  • Specialized simple dispatch by active variant index to reduce per-case matching overhead.
  • Added prefiltering for mixed simple + guarded variant patterns so guarded branches can skip irrelevant alternatives early.
  • Simplified internal index-resolution flow for typed variant dispatch.

Real-World Variant Benchmarks

  • Added protocol-router scenario benchmarks.
  • Added command-parser scenario benchmarks.
  • For each scenario, included side-by-side implementations for:
  • Patternia
  • if-else
  • switch-case
  • std::visit

Benchmark Tooling and Visualization

  • Added scripts/bench_single_report.py for single-JSON visualization across multiple implementations in the same scenario.
  • The script outputs chart + markdown + csv summaries to simplify local analysis and sharing.

Documentation Refresh

  • Moved latest benchmark snapshot to the top of README for faster performance-oriented access.
  • Updated benchmark workflow docs with single-file visualization commands.

Compatibility Notes

  • API surface: unchanged for 0.7.x users.
  • Source compatibility: unchanged.
  • Runtime semantics: unchanged externally; optimizations are internal to variant evaluation and benchmark tooling.

Implementation Notes

  • include/ptn/core/common/eval.hpp
  • Added and refined variant fast paths for simple and mixed-guarded cases.
  • bench/bench_match_variant.cpp
  • Added protocol-router and command-parser practical benchmark scenarios.
  • scripts/bench_single_report.py
  • Added single-JSON benchmark report generation utility.
  • README.md
  • Updated benchmark snapshot placement and workflow guidance.
  • docs/index.md
  • Synced benchmark tooling entry points for docs navigation.