Methodology
How the numbers are produced, and how to read them
This page describes methodology version 0.5 (draft, 2026-11-24). A draft version may still change, and so may the numbers measured under it. Every number on this site was measured under it; other versions have their own site, reachable from the bar at the top of every page.
What is measured
The corpus is PRL-PRG/r-benchmarks, pinned to one commit, characterised in What Do R Benchmarks Measure? Toward a Performance-Characterized Benchmark Suite for R (VMIL’26). Each program defines execute(size) and, optionally, an untimed setup(). Timing, repetition and process management belong to the shared harness, driven by the bench framework.
- R’s recommended packages (MASS, Matrix, lattice, …) are built with every release, as R’s default build does: each R version runs with the versions it shipped with.
- Four benchmarks (
lr,lr_test,pca,pca-blocked) also need clusterGeneration, used only to generate their input insetup(). Every build gets the version that was on CRAN at the date of its source; where it does not install, those benchmarks are recorded as unsupported. - Left out:
mathkernel/MMM-T1. Its time depends on where the linker places R’s code (on one of eleven layouts it took 20% longer), so a run could not resolve a change smaller than about 10% in it; its kernel, a scalar triple loop over 200×200 matrices, is alsomatmult_triplp’s, which is among the steadiest benchmarks. The other 117 are measured.
How R is built
- Releases are built from the CRAN source tarballs. R-devel (and R-patched) from the source snapshots CRAN publishes daily, which include the recommended packages, identified by their SVN revision.
- Every version is built the way R builds by default: a plain
./configure(only the install prefix is given) andmake. So R chooses its own flags (-g -O2), uses its internal BLAS and LAPACK, links into oneRbinary (no sharedlibR) and builds the recommended packages. - One compiler for every version: GCC 16.2.0 as upstream builds it (the official
gcc:16container image), in an image whose libraries come from a dated Ubuntu archive snapshot. A compiler change would move every number at once. Upstream GCC adds no hardening by itself (distributions’ GCCs add_FORTIFY_SOURCE, stack protector, PIE and more), and its own-O2, vectoriser included, is used for every version. - Settings by version range. A settings file adds compiler options to every version or to versions up to or from a given release. A source tree is placed by the version it declares, so a snapshot of R-devel gets the rules of the release it leads up to, and releases after R 4.6.2 keep the current settings.
- The C dialect of the time. Each version gets the default C dialect of the newest GCC released before it (gnu89 until GCC 4.9, gnu11 for GCC 5 to 7, gnu17 for GCC 8 to 14, gnu23 from GCC 15); R’s
configurethen adds its own-stdwhere it did at the time (-std=gnu99on top of gnu89, C23 from R 4.5.0). - Settings that change no generated code go to every version:
-fpermissive(implicit declarations were warnings before GCC 14; without it R 3.0.0’sconfiguresilently decidesftellis broken),-fallow-argument-mismatch(Fortran, likewise before gfortran 10) and aconfigureanswer that lets R before 4.2 accept curl 8. For R 4.6.2,configuredecides exactly the same with and without them. -fcommon(the default before GCC 10) can change the generated code, so it goes only to the releases up to the newest one that does not link without it: R 3.6.1 and older (found by bisection; 3.6.2 links).- R before 4.0 needs PCRE1, which Ubuntu no longer ships: it is built from its last release (8.45) with the same compiler.
- Four code layouts of every build. Where the linker places R’s code moves some benchmarks’ times by up to 20% (through branch prediction and the instruction cache), and any change to R moves the code. So every build is also linked three more times with 1000, 2100 and 3300 bytes of filler in front of R’s own code (the first object after the C runtime’s), placing it at four points spread over a 4 KiB page, the period of the instruction cache’s sets, and not a whole number of KiB apart (four of the eleven layouts the run design was chosen on). Only the link is repeated: the binary is byte for byte what compiling with the filler gives, and the rest of the installation is the same files.
How a run is measured
- Every benchmark runs in 4 separate R processes, one on each code layout, each doing 1 warm-up and 4 measured iterations, as
R --slave --vanillaundersetarch -R. A run is four passes over the suite, one per layout, each in the same fixed shuffled order (about 75 minutes for R 4.5.2). - Before every iteration the harness collects garbage, then idles for 1 ms before starting the clock. Without the pause, the state one iteration left in the CPU’s branch predictors carried into the next: about one
convolutioniteration in fifteen ran 37% slower, andatt3_5,emandmatmult_triplpmoved by whole processes. - Runs execute in the build’s container, pinned to one isolated CPU core, with no network.
- The machine runs a pinned kernel, with the benchmark core isolated from the scheduler (
isolcpus,nohz_full,rcu_nocbs), the performance governor, turbo off and the frequency fixed, address-space randomisation off system-wide, transparent huge pages off, and no power-management daemons. The batch system checks all of it before every job and refuses to run otherwise. - CPU temperature and thermal throttling are sampled every second during every benchmark execution, which records its hottest reading and the throttle events counted during it. An execution during which the CPU came within 10 °C of the limit the CPU itself declares, or throttled, is flagged as possibly affected.
- A machine is a set of identical boxes (same hardware, firmware settings and system): their results form one series, whichever box measured them. Before every run, two checks compare the box with its machine’s reference, measured when the machine was calibrated:
- the probe, a native program of the cluster, on the benchmark core after a warm-up: integer and branch throughput, cache and memory latency, memory bandwidth;
- the sentinel, a few short benchmarks of the suite on a fixed build (R 4.5.2), after warm-up iterations.
- A box runs a job only once fully booted: systemd reports the boot complete, no start-up jobs are pending and it has been up for a minute (it is idle from about 30 s of uptime). Periodic maintenance (package updates, indexing, trims) is disabled on the boxes.
Statistics
- A benchmark’s time on a run is the geometric mean over processes of each process’s median measured iteration. Its interval is a 95% t-interval on the log scale with the process as the unit of replication (3 degrees of freedom for one run, 6 for a comparison of two). Each run’s standard error has a floor of 0.1% added: what a run carries beyond the spread of its processes. A comparison therefore never resolves a change below about 0.35%.
- A speedup is time(A) / time(B): above 1× means B is faster. Speedups are only ever computed between runs on the same machine and under the same methodology version.
- The baseline (1×) is the R version shipped in the newest Ubuntu LTS, currently R 4.5.2 in Ubuntu 26.04: the R most Linux users get without adding CRAN’s repository. The table of which R each LTS ships (3.0.2 in 14.04, 3.2.3 in 16.04, 3.4.4 in 18.04, 3.6.3 in 20.04, 4.1.2 in 22.04, 4.3.3 in 24.04, 4.5.2 in 26.04) is kept in
data/ubuntu-lts.csv. Every build checks Ubuntu’s release list for a newer LTS and reads ther-baseversion it shipped from Launchpad, so when a new LTS is released every speedup on the site is rescaled to its R at the next build. A machine that has not measured that release uses its oldest measured release instead. - Suite-level numbers are geometric means over the benchmarks that every compared run could execute. The count is always shown, because old releases cannot run benchmarks that need newer R.
- R-devel change detection flags a benchmark when it moves by more than 2% and outside its interval relative to the previous seven good nights, and the next three nights confirm it.
How the run design was chosen
On the kabylake machine, R 4.5.2 was measured on eleven code layouts and then under this design six times, each run on four of the layouts. Comparing every two of those runs (the same build, so no change to find), with the 117 benchmarks:
- an interval excluded no change in 2.1% of the comparisons (95% intervals allow 5%), and no benchmark was flagged (a change above 2% outside its interval) in any of them;
- a comparison of two runs resolves a change of 0.43% for the median benchmark, 1.2% at the 90th percentile; 16 benchmarks above 1%, 3 above 2% (
heat,rw2d1andpidigits, whose layouts or processes vary most); - for all but a few benchmarks, runs differed no more than the spread of their processes predicts; the largest excess, in
reversecomplementandpidigits, was 0.6–0.7%, well below the 2% a change must exceed to be flagged.
The first iteration of a process is slower for most benchmarks (by 1.9% at the median, up to 39%); from the second on, iterations differ from the steady state no more than from each other, so one warm-up is enough.
Profiles
A second pass records each benchmark 5 times with perf record --call-graph dwarf,32768 on the same build. Only samples inside execute() are kept, using phase markers the harness prints. Each sample is charged to the innermost stack frame a rule recognises, checked in this order:
- Object rules: frames in BLAS/LAPACK libraries are
native-blas, and frames in a package’s own shared object arenative-ffi. - Symbol rules: a table of named interpreter functions (for example
bcEval→ interpreter,R_findVar→ lookup,Rf_duplicate→ mem-duplicate). - Shape rule:
do_*andALT*functions inside the interpreter areprimitives, apart from the dispatch primitives (UseMethod,NextMethod,standardGeneric).
Samples no rule reaches are reported as unattributed and never hidden. A run whose unattributed share exceeds 5% fails the quality gate. The rules were validated (VMIL’26) on builds like these, without frame pointers. Profiles on platforms without perf (macOS: samply) are marked experimental until their category shares are shown to agree with perf.
Methodology versions
Data and licences
- Pipeline code: PRL-PRG/speedR, MIT.
- Results: PRL-PRG/speedR-results, CC0: raw bench reports, per-process samples and per-benchmark profiles for every run, with each run’s machine, toolchain, configuration and sentinel metadata.
- Benchmark programs keep their original licences; see each suite’s
ORIGIN.md.