Benchmark: pascal26 vs FPC — 2026-05-26
Self-hosting fixedpoint achieved. First benchmark run.
Compiling the compiler (compiler/compiler.pas, 4624 lines)
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
FPC -O2 |
316.3 ± 37.5 | 263.8 | 436.0 | 11.93 ± 1.77 |
self-hosted pascal26 |
26.5 ± 2.4 | 23.9 | 34.7 | 1.00 |
12× faster than FPC
Batch compile (20 × test/hello.pas)
| Command | Mean [s] | Min [s] | Max [s] | Relative |
|---|---|---|---|---|
FPC: 20 x hello |
1.006 ± 0.095 | 0.877 | 1.205 | 84.43 ± 15.67 |
self-hosted pascal26: 20 x hello |
0.012 ± 0.002 | 0.010 | 0.015 | 1.00 |
84× faster than FPC (dominated by FPC startup overhead)
Binary sizes
| Binary | Size |
|---|---|
| pascal26 (self-compiled) | 171,415 bytes |
| FPC-compiled compiler | 613,904 bytes |
| hello world (pascal26) | 287 bytes |
| hello world (FPC) | 191,072 bytes |
pascal26 compiler: 3.6× smaller than FPC output.
hello world: 665× smaller — zero stdlib drag, direct ELF.
Method
- hyperfine --warmup 3 --runs 30 (compiler); --runs 10 (hello batch)
- FPC 3.2.2, -O2 -Tlinux -Px86_64
- Linux x86-64