← board

Track T: bench.tsv has no fpc column for mandelbrot / raytracer / sieve

Where it comes from

BENCH_SUITE in tools/testmgr.py (~line 1421) tags each workload with an fpc_ok flag; only fpc_ok=True workloads are also compiled+timed under fpc -O2 for the fpc level:

("mandelbrot", ..., False),   # float compute (pxx units)
("raytracer",  ..., False),   # call-heavy float
("sieve",      ..., False),   # memory-bound int
("nbody",      ..., True),    # float, FPC-comparable
("fib",        ..., True),    # call-heavy int, FPC-comparable

FPC flags used: -O2 -Tlinux -Px86_64 (no -M mode), mirroring the Makefile FPCFLAGS.

Findings — two distinct causes, verified with fpc 3.2.2

mandelbrot — pxx-only unit (structural, fpc_ok=False is correct).

mandelbrot.pas(31,26) Fatal: Can't find unit ansiterm used by Mandelbrot

uses sysutils, baseunix, ansiterm;ansiterm is a pxx RTL unit with no FPC equivalent. Not FPC-comparable without an FPC shim.

raytracer — pxx-only units (structural, fpc_ok=False is correct).

raytracer.pas(25,22) Fatal: Can't find unit image used by RayTracer

uses sysutils, math, image, png, hashing, platform;image, png, hashing, platform are pxx lib units. Same story as mandelbrot.

sieve — NOT structural; it is a dialect/mode gap and IS fixable.

sieve.pas(87,5) Error: range check error while evaluating constants
                       (1000000 must be between -32768 and 32767)

uses sysutils; only — no pxx-only unit. The failure is that FPC's default mode types Integer as 16-bit smallint, so the for n := 2 to LIMIT do loop (LIMIT = 1000000) overflows the loop variable's range. pxx defaults Integer to ≥32-bit, so it compiles as-is. Adding -Mobjfpc (32-bit Integer) makes FPC compile it clean:

$ fpc -Mobjfpc -O2 examples/primes/sieve.pas
102 lines compiled, 0.1 sec

Suggested fixes (Track T's call)

Why it matters

Low priority — the dashboard is honest today (blank = no data). But a reader sees three blanks and can't tell "FPC can't build this" from "we forgot to measure it". sieve in particular is a free extra FPC comparison being left on the table over a one-flag mode mismatch.

Log