← all benchmarks

Benchmark: pascal26 vs FPC - 2026-06-02

This snapshot follows the managed-value, dynamic-array, C-import, GUI, and Nil Python frontend expansion. Historical snapshots remain useful because they show the cost of the broader compiler surface.

Environment

Compiling The Compiler

Workload: compile compiler/compiler.pas once. Hyperfine used 3 warmups and 30 measured runs.

Command Mean [ms] Min [ms] Max [ms] Relative
FPC -O2 977.6 +/- 16.9 957.6 1030.7 1.18 +/- 0.03
self-hosted pascal26 828.9 +/- 12.2 812.6 866.1 1.00

The self-hosted path remains 1.18x faster than FPC on its own expanded source tree.

Batch Compile

Workload: compile test/hello.pas 20 times per sample. Hyperfine used 1 warmup and 10 measured runs.

Command Mean [ms] Min [ms] Max [ms] Relative
FPC: 20 x hello 772.4 +/- 11.5 756.9 793.2 19.15 +/- 0.68
self-hosted pascal26: 20 x hello 40.3 +/- 1.3 39.1 43.6 1.00

The self-hosted path remains 19.15x faster than FPC for the small-source batch.

Binary Sizes

Output executable FPC Self-hosted pascal26
Compiler 1,100,896 bytes 839,408 bytes
Pascal hello 191,072 bytes 1,134 bytes

The generated Pascal hello-world binary is a directly emitted static ELF64 executable with one program header and no section table. It prints Hello, World!.

Method

Run:

make benchmark

The Makefile records the hyperfine markdown under /tmp, checks both hello outputs, and checks that the self-built compiler can compile and run hello.

This is a build-speed and output-size snapshot, not an optimizer or complete language-implementation comparison. FPC emits a general-purpose Pascal executable with its runtime. pascal26 emits the covered direct-ELF subset.