Mojito logoMojito ← Back to Mojito

Fresh-process CGI benchmark

Evidence for Mojito's narrow CGI design thesis.

The published comparison measures raw CGI, Mojito, and a structured Mojolicious CGI application under a fresh Perl process per request. The framework responses were normalized to the same 140-byte HTML body so the comparison focuses on repeated startup and request cost.

The published measurements are historical evidence and are preserved rather than silently regenerated. Their arithmetic, harness behavior, RSS/module-count evidence, and surrounding public claims were re-verified against repository commit 2ff597b on 2026-09-09.

MetricRaw CGIMojitoMojolicious CGI
p5010.875 ms37.298 ms245.822 ms
Added over raw CGI—26.423 ms234.947 ms
p9511.702 ms39.039 ms258.283 ms

Normalized p50

84.8% lower

Mojito than structured Mojolicious CGI in this specific fresh-process benchmark.

Peak RSS

6.78 MiB

Mojito versus 41.11 MiB for structured Mojolicious CGI.

RSS difference

34.33 MiB

Per measured process in this workload.

Loaded modules

12 vs ~207

Mojito modules versus Mojolicious modules for the normalized request.

Published environment

OS
macOS 26.6.2
CPU
Intel Core i5-10500
Memory
16 GiB RAM
Perl
5.26.3
Mojito benchmark build
0.001 (historical measurement)
Mojolicious
9.49

What this supports

Mojito substantially reduces the per-request framework cost of running a structured Perl web application under traditional fresh-process CGI.

It does not support a general claim that Mojito is faster, better, or more capable than Mojolicious. Mojolicious carries far more capability and is designed to excel under persistent application architectures.

Benchmark integrity

The harness builds real applications and records more than wall time.

  • • generates a real standalone Mojito app
  • • builds a structured Mojolicious equivalent
  • • normalizes and validates response bodies
  • • interleaves runs to reduce ordering bias
  • • records wall time and CPU
  • • records peak RSS and bytes
  • • records loaded module counts
  • • commits evidence TSVs for review

bench/cgi-welcome-comparison.pl is the benchmark harness. Its regression test t/241-cgi-welcome-benchmark.t passed in the 2026-09-09 review.

Why raw CGI is useful

The 10.875 ms raw-CGI result gives a practical floor on the published benchmark machine. Mojito cannot remove process creation, Perl startup, CGI environment setup, output, or process teardown. The measured question is how much structured framework behavior gets added above that floor.

10.875 ms raw CGI
+ 26.423 ms Mojito/application
= 37.298 ms normalized Mojito p50

2026-09-09 recheck

A fresh standalone measurement landed in the same neighborhood.

Raw CGI p50

5.795 ms

Mojito GET / p50

33.092 ms

Added over raw

~27.3 ms

This is a separate fresh measurement, not a replacement for the published normalized comparison above.

What stays off the plain path

Lazy features are not silently counted as Welcome-request cost.

Sessions, authentication helpers, database/DBI access, file cache, validation, and the command system are lazy, optional, or outside the plain Welcome request path. The normalized comparison should not be read as measuring application workloads that activate those features.

Current review status

Current product status: v1.0.0 (beta).

  • • current product version: v1.0.0 (beta)
  • • security suite: PASS (148 tests)
  • • release check: PASS
  • • full suite: PASS (111 files, 2,941 assertions)
  • • database:migrate / database:wipe: IMPLEMENTED

The current product is v1.0.0 (beta). The published normalized benchmark above is historical evidence from the 0.001 benchmark build; its measurements are preserved rather than relabeled as a v1.0.0 (beta) run. Beta APIs may still change.

The right conclusion

If you can run a persistent Perl application, use Mojolicious. If the hosting account gives you traditional Perl CGI and not much else, Mojito is designed to keep the repeated framework startup bill small while preserving a structured application experience.