NAME

problem48-static-template-benchmark - measure the static page-template fast path

PURPOSE

This benchmark compares the prior Template Toolkit process call for a static HTML body with PageRuntime::_render_templates's new delimiter check and early return. It requires exact output parity, including a non-ASCII character.

WHY IT EXISTS

NYTProf found that dashboard page preparation called Template Toolkit for static navigation fragments as well as templates. Static bodies with no default [% opener have no template work to perform, so they can skip context assembly and processing without changing their output.

WHEN TO USE

Run it after changing PageRuntime's template delimiter handling or its static HTML rendering path. This microbenchmark measures one routine only; it is not an end-to-end dashboard speedup or proof of the overall 50x target.

HOW TO USE

perl script/problem48-static-template-benchmark
perl script/problem48-static-template-benchmark --iterations 10000 --runs 21

OUTPUT

The report gives median milliseconds per render, the paired-run count, and the speed ratio. Both implementations must return the exact same UTF-8 string or the command exits with an explicit error.

SAFETY

The benchmark performs no filesystem writes and runs no shell commands. Template Toolkit failures and output mismatches are fatal and visible.