From 3c5227e2bf2737bc985a2fc6b163b04263aa3896 Mon Sep 17 00:00:00 2001 From: Aditya Mukhopadhyay Date: Fri, 30 Oct 2026 11:43:31 +0530 Subject: [PATCH 1/3] perf: ship full-LTO dist builds and gate their size (#796) `profile.dist` no longer overrides release's full LTO with thin LTO, and binary-size.yml builds `--profile dist`, so the gate measures the binary cargo-dist ships. The x86_64 Linux binary is unchanged (it equals the release build); the shipped one shrinks from 1,501,232 to 1,262,584 bytes. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01H2a7Qo5yfvBEjzSuUoB2n9 --- .github/workflows/binary-size.yml | 9 +-- Cargo.toml | 4 +- docs/benchmarks/796-dist-lto.py | 111 ++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+), 6 deletions(-) create mode 100644 docs/benchmarks/796-dist-lto.py diff --git a/.github/workflows/binary-size.yml b/.github/workflows/binary-size.yml index 66ddf18cfb..7c7ddcb033 100644 --- a/.github/workflows/binary-size.yml +++ b/.github/workflows/binary-size.yml @@ -11,7 +11,7 @@ permissions: jobs: binary-size: - name: Check release binary size + name: Check distribution binary size runs-on: ubuntu-latest env: SIZE_LIMIT_BYTES: 1263616 # 1234 KiB — #277 error codes, #306 top-k, #723 ancestor join planning; see PHILOSOPHY.md §4 @@ -22,12 +22,13 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - - name: Build release binary - run: cargo build --release + # The profile cargo-dist ships (#796) + - name: Build distribution binary + run: cargo build --profile dist - name: Check binary size run: | - BINARY=target/release/minigraf + BINARY=target/dist/minigraf SIZE=$(stat -c %s "$BINARY") SIZE_KB=$(( SIZE / 1024 )) LIMIT_KB=$(( SIZE_LIMIT_BYTES / 1024 )) diff --git a/Cargo.toml b/Cargo.toml index 91f8cc6398..b8bde9efad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -130,10 +130,10 @@ lto = true codegen-units = 1 panic = "unwind" -# The profile that 'dist' will build with +# The profile that 'dist' will build with. It keeps release's full LTO, so the +# shipped binaries are the ones binary-size.yml measures (#796). [profile.dist] inherits = "release" -lto = "thin" [lints] workspace = true diff --git a/docs/benchmarks/796-dist-lto.py b/docs/benchmarks/796-dist-lto.py new file mode 100644 index 0000000000..abab9f96d6 --- /dev/null +++ b/docs/benchmarks/796-dist-lto.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python3 +"""Compare a thin-LTO and a full-LTO `dist` CLI on fixed REPL workloads (#796). + +Usage: 796-dist-lto.py THIN_EXE FULL_EXE OUTPUT_JSON [ROUNDS] + +Each round runs every workload once per binary, alternating which goes first. +Both binaries must print the same output (transaction timestamps aside). +Times include process start, ingestion and printing; this is a CLI check, +not a query benchmark. Runs on Linux, macOS and Windows with no extra tools. +""" +import json +import os +import platform +import re +import statistics +import subprocess +import sys +import tempfile +import time + +thin, full, output = sys.argv[1:4] +rounds = int(sys.argv[4]) if len(sys.argv) > 4 else 10 + + +def count(): + # The #772 audit workload: 2,000 facts, 400 counts. + ingest = "(transact [" + " ".join(f"[:e{i} :v {i % 20}]" for i in range(2000)) + "])\n" + return ingest + "(query [:find (count ?e) :where [?e :v ?v]])\n" * 400 + + +def recursive(): + # Transitive closure of a 300-node chain, 10 times. + edges = " ".join(f"[:n{i} :next :n{i + 1}]" for i in range(300)) + return (f"(transact [{edges}])\n" + "(rule [(reach ?x ?y) [?x :next ?y]])\n" + "(rule [(reach ?x ?y) [?x :next ?z] (reach ?z ?y)])\n" + + "(query [:find (count ?y) :where (reach :n0 ?y)])\n" * 10) + + +def aggregate(): + # 5,000 people in 20 departments: a join and grouped sums, 50 times. + people = " ".join(f"[:p{i} :dept :d{i % 20}] [:p{i} :salary {1000 + i % 97}]" + for i in range(5000)) + depts = " ".join(f'[:d{i} :name "dept {i}"]' for i in range(20)) + return (f"(transact [{depts}])\n(transact [{people}])\n" + + "(query [:find ?n (sum ?s) :where [?p :dept ?d] [?d :name ?n] [?p :salary ?s]])\n" * 50) + + +def file_backed(): + # 20 transactions of 500 facts into a .graph file (WAL, close-time save). + txs = "".join("(transact [" + " ".join(f"[:f{t}-{i} :v {i}]" for i in range(500)) + "])\n" + for t in range(20)) + return txs + "(query [:find (count ?e) :where [?e :v ?v]])\n" + + +WORKLOADS = {"count": count(), "recursive": recursive(), + "aggregate": aggregate(), "file": file_backed()} +TX = re.compile(rb"\(tx: \d+\)") + + +def run(binary, name, script): + args = [binary] + tmp = None + if name == "file": + tmp = tempfile.mkdtemp(prefix="minigraf-796-") + args += ["--file", os.path.join(tmp, "db.graph")] + start = time.perf_counter() + r = subprocess.run(args, input=script.encode(), stdout=subprocess.PIPE, + stderr=subprocess.PIPE, check=True) + elapsed = time.perf_counter() - start + if tmp: + for f in os.listdir(tmp): + os.remove(os.path.join(tmp, f)) + os.rmdir(tmp) + if r.stderr: + sys.exit(f"{binary} {name}: stderr: {r.stderr[:200]!r}") + return elapsed, TX.sub(b"(tx: _)", r.stdout) + + +rows = [] +for i in range(rounds): + for name, script in WORKLOADS.items(): + order = [("thin", thin), ("full", full)] if i % 2 == 0 else [("full", full), ("thin", thin)] + row = {"round": i, "workload": name, "first": order[0][0]} + outs = {} + for label, binary in order: + row[f"{label}_seconds"], outs[label] = run(binary, name, script) + if outs["thin"] != outs["full"]: + sys.exit(f"{name}: thin and full LTO outputs differ") + if name == "count" and outs["full"].splitlines().count(b"2000") != 400: + sys.exit("count: expected 400 counts of 2000") + rows.append(row) + print(row, flush=True) + +summary = {} +for name in WORKLOADS: + ws = [r for r in rows if r["workload"] == name] + deltas = [r["full_seconds"] / r["thin_seconds"] - 1 for r in ws] + summary[name] = { + "thin_median_seconds": statistics.median(r["thin_seconds"] for r in ws), + "full_median_seconds": statistics.median(r["full_seconds"] for r in ws), + "median_delta": statistics.median(deltas), + "full_faster_rounds": sum(d < 0 for d in deltas), + "rounds": len(ws), + } +result = {"platform": platform.platform(), "machine": platform.machine(), + "thin_bytes": os.path.getsize(thin), "full_bytes": os.path.getsize(full), + "summary": summary, "rows": rows} +with open(output, "w") as f: + f.write(json.dumps(result, indent=2) + "\n") +print(json.dumps(summary, indent=2)) From 4ce65db040a5f0eb3286d23fb96166e464d8bada Mon Sep 17 00:00:00 2001 From: Aditya Mukhopadhyay Date: Fri, 30 Oct 2026 12:02:22 +0530 Subject: [PATCH 2/3] docs: measure full-LTO dist builds on every release target (#796) Sizes, clean build times, CLI runtime and cargo-dist packaging on the five release runners and the bench machine; record that the size gate measures the shipped x86_64 Linux dist binary. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01H2a7Qo5yfvBEjzSuUoB2n9 --- CHANGELOG.md | 2 + PHILOSOPHY.md | 7 +- docs/benchmarks/796-dist-lto.md | 97 +++ .../builds-aarch64-apple-darwin.json | 30 + .../builds-aarch64-unknown-linux-gnu.json | 30 + .../builds-bench-x86_64-linux.json | 30 + .../builds-x86_64-apple-darwin.json | 30 + .../builds-x86_64-pc-windows-msvc.json | 30 + .../builds-x86_64-unknown-linux-gnu.json | 30 + docs/benchmarks/796-dist-lto/builds.py | 26 + .../package-aarch64-apple-darwin.json | 7 + .../package-aarch64-unknown-linux-gnu.json | 7 + .../package-x86_64-apple-darwin.json | 7 + .../package-x86_64-pc-windows-msvc.json | 7 + .../package-x86_64-unknown-linux-gnu.json | 7 + .../runtime-aarch64-apple-darwin.json | 318 ++++++++++ .../runtime-aarch64-unknown-linux-gnu.json | 318 ++++++++++ .../runtime-bench-x86_64-linux.json | 598 ++++++++++++++++++ .../runtime-x86_64-apple-darwin.json | 318 ++++++++++ .../runtime-x86_64-pc-windows-msvc.json | 318 ++++++++++ .../runtime-x86_64-unknown-linux-gnu.json | 318 ++++++++++ .../runtime.py} | 2 +- 22 files changed, 2535 insertions(+), 2 deletions(-) create mode 100644 docs/benchmarks/796-dist-lto.md create mode 100644 docs/benchmarks/796-dist-lto/builds-aarch64-apple-darwin.json create mode 100644 docs/benchmarks/796-dist-lto/builds-aarch64-unknown-linux-gnu.json create mode 100644 docs/benchmarks/796-dist-lto/builds-bench-x86_64-linux.json create mode 100644 docs/benchmarks/796-dist-lto/builds-x86_64-apple-darwin.json create mode 100644 docs/benchmarks/796-dist-lto/builds-x86_64-pc-windows-msvc.json create mode 100644 docs/benchmarks/796-dist-lto/builds-x86_64-unknown-linux-gnu.json create mode 100644 docs/benchmarks/796-dist-lto/builds.py create mode 100644 docs/benchmarks/796-dist-lto/package-aarch64-apple-darwin.json create mode 100644 docs/benchmarks/796-dist-lto/package-aarch64-unknown-linux-gnu.json create mode 100644 docs/benchmarks/796-dist-lto/package-x86_64-apple-darwin.json create mode 100644 docs/benchmarks/796-dist-lto/package-x86_64-pc-windows-msvc.json create mode 100644 docs/benchmarks/796-dist-lto/package-x86_64-unknown-linux-gnu.json create mode 100644 docs/benchmarks/796-dist-lto/runtime-aarch64-apple-darwin.json create mode 100644 docs/benchmarks/796-dist-lto/runtime-aarch64-unknown-linux-gnu.json create mode 100644 docs/benchmarks/796-dist-lto/runtime-bench-x86_64-linux.json create mode 100644 docs/benchmarks/796-dist-lto/runtime-x86_64-apple-darwin.json create mode 100644 docs/benchmarks/796-dist-lto/runtime-x86_64-pc-windows-msvc.json create mode 100644 docs/benchmarks/796-dist-lto/runtime-x86_64-unknown-linux-gnu.json rename docs/benchmarks/{796-dist-lto.py => 796-dist-lto/runtime.py} (98%) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff5299001b..1f77ba92bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Performance +- **Released binaries use full LTO** (#796). The `dist` profile cargo-dist builds releases with no longer overrides `release`'s full LTO with thin LTO. The CLI is 7–31% smaller on the five release targets (x86_64 Linux 1,501,232 → 1,262,584 bytes, measured before #794) and 4–17% faster on query workloads; clean builds take up to 10 seconds longer. `binary-size.yml` now builds `--profile dist`, so it measures the shipped x86_64 Linux binary (still under the unchanged 1,263,616-byte cap). Windows packages keep cargo-dist's static C runtime. See `docs/benchmarks/796-dist-lto.md`. + - **Sort set element encodings without a stable sort** (#794). `set_elements` sorts its elements' byte encodings with `sort_unstable`: equal encodings are identical bytes and deduplicated straight after, so the encoded bytes are unchanged, and the stable sort's scratch allocation and code go. The native release binary is 3,024 bytes smaller (WASI 950, thin-LTO dist 4,112). On the bench machine, ingest, checkpoint, set-constant queries and scans of 100,000 32-element sets in seven input shapes stayed within run-to-run noise. No API, format or error change. - **Unstable sorts for unique query metadata** (#795). Prepared-query slot names, an `or`'s branch variables and a subplan's imported variables sort with `sort_unstable`: their keys are unique, or, for a join variable named twice, the tied entries are identical, so order and plans are unchanged. Release builds shrink by 1,008 bytes (native CLI), 1,752 bytes (WASI) and 1,886 bytes (browser `--lib`); prepare and planning time is unchanged within noise. No API, dependency or file-format change. diff --git a/PHILOSOPHY.md b/PHILOSOPHY.md index 6cf72e6485..4fea256879 100644 --- a/PHILOSOPHY.md +++ b/PHILOSOPHY.md @@ -118,7 +118,12 @@ SQLite's success comes from a clear philosophy: be a library, not a server. Be s fit the 2 KiB left after the streaming engine (#473) and set values (#316). The approved #723 ancestor-join optimization raises it to 1,234 KiB: the measured increase is 2,720 bytes, avoiding a whole-attribute value - map for selective in-memory recursion without adding a storage index + map for selective in-memory recursion without adding a storage index. + The gate builds the x86_64 Linux CLI with cargo-dist's `dist` profile, + the one releases ship. From v3.0.0 `dist` keeps release's full LTO + rather than thin LTO, 7–31% smaller per target (#796; sizes per target + in `docs/benchmarks/796-dist-lto.md`). Other targets are measured, not + gated; a profile setting for one target needs its own measurement - No runtime dependencies (no JVM, no Python, no Node.js) **Anti-pattern**: Requiring external services, libraries, or runtimes to function. diff --git a/docs/benchmarks/796-dist-lto.md b/docs/benchmarks/796-dist-lto.md new file mode 100644 index 0000000000..955eb05b72 --- /dev/null +++ b/docs/benchmarks/796-dist-lto.md @@ -0,0 +1,97 @@ +# Full LTO for distribution builds (#796) + +cargo-dist builds the released CLI with the `dist` profile. Before #796 it +inherited `release` but set `lto = "thin"`, while `binary-size.yml` built +`--release` (full LTO): the gate measured a binary nobody downloaded. `dist` +now keeps release's full LTO, and the gate builds `--profile dist`. + +## Method + +Revision: `perf/796-dist-lto` at its first commit (v3 `2ff91059e` plus the profile +change), rustc 1.99.1 everywhere. Thin LTO is the same profile with +`CARGO_PROFILE_DIST_LTO=thin`. + +- **CI matrix**: the five cargo-dist targets on the runners `dist plan` assigns + (macos-14, ubuntu-22.04-arm, macos-15-intel, windows-2022, ubuntu-22.04), + run once from a temporary branch (`measure/796`, workflow run 41012917889; + the branch is deleted). Per runner: [`builds.py`](796-dist-lto/builds.py) + times four clean builds (thin, full, full, thin; dependencies fetched, not + compiled), [`runtime.py`](796-dist-lto/runtime.py) runs 10 alternating + rounds, and `dist build --artifacts=local` packages the target, whose + archive is unpacked and run on `demos/demo_commands.txt`. +- **Bench machine**: the same two scripts on x86_64 Linux, bound to one NUMA + node, with 20 runtime rounds. +- **Runtime workloads** (each a CLI process fed a script on stdin; times include + start-up, ingestion and printing): `count` (#772's 2,000 facts, 400 counts), + `recursive` (closure of a 300-node chain, 10 queries), `aggregate` (5,000 + people in 20 departments, a join and grouped sum, 50 queries), `file` (20 + transactions of 500 facts into a `.graph` file, one count). Both builds must + print the same output, transaction timestamps aside. + +## Size + +| Target | Thin LTO | Full LTO | Saved | +| --- | ---: | ---: | ---: | +| x86_64-unknown-linux-gnu | 1,501,232 | **1,262,584** | 238,648 (15.9%) | +| aarch64-unknown-linux-gnu | 1,262,544 | 1,094,504 | 168,040 (13.3%) | +| x86_64-apple-darwin | 1,503,392 | 1,075,840 | 427,552 (28.4%) | +| aarch64-apple-darwin | 1,372,560 | 954,192 | 418,368 (30.5%) | +| x86_64-pc-windows-msvc, as packaged (static CRT) | 1,139,712 | 1,060,864 | 78,848 (6.9%) | + +The x86_64 Linux full-LTO binary is what the gate measures: 1,262,584 bytes +against the unchanged 1,263,616-byte cap. It equals the `--release` binary, so +the change gives the gate no headroom. Sizes were identical across a runner's +two builds. + +**Packaging.** On Linux and macOS the packaged binary has the full-LTO size +(aarch64-apple-darwin: 16 bytes more, the build is under a different target +directory); its bytes differ from the separate build. On Windows cargo-dist +links the C runtime statically (`+crt-static`), which the plain builds above +do not: a second run (41014187879) built thin and full LTO with +`RUSTFLAGS=-Ctarget-feature=+crt-static` and the `--target` cargo-dist uses. +The full build matches the packaged 1,060,864 bytes, differing only in the PE +header; thin is 1,139,712. Without the static CRT the Windows binaries are +1,041,920 (thin) and 963,072 (full). All five packaged binaries ran the demo. + +The gate checks x86_64 Linux only. The other targets' sizes are recorded here, +not gated. + +## Build time + +Clean builds, seconds, in run order (thin, full, full, thin): + +| Runner | Thin | Full | Full | Thin | +| --- | ---: | ---: | ---: | ---: | +| ubuntu-22.04 | 43 | 30 | 31 | 28 | +| ubuntu-22.04-arm | 30 | 28 | 28 | 26 | +| macos-15-intel | 124 | 97 | 77 | 67 | +| macos-14 | 42 | 41 | 42 | 37 | +| windows-2022 | 64 | 46 | 47 | 46 | +| bench, x86_64 Linux | 28 | 31 | 31 | 28 | + +The first build on each runner is slower whatever its profile (cold caches). +Comparing the warmer pairs, full LTO costs 0–10 seconds (0–15%) per build, +3 seconds on the bench machine. A release builds each target once. + +## Runtime + +Median full-vs-thin change in elapsed time, and the rounds full LTO won: + +| Runner | count | recursive | aggregate | file | +| --- | ---: | ---: | ---: | ---: | +| ubuntu-22.04 | −12.7% (10/10) | −9.4% (10/10) | −8.7% (10/10) | −9.0% (10/10) | +| ubuntu-22.04-arm | −9.7% (10/10) | −16.0% (10/10) | −17.4% (10/10) | −3.6% (10/10) | +| macos-15-intel | −7.4% (7/10) | −3.9% (9/10) | −7.8% (8/10) | −1.5% (6/10) | +| macos-14 | −6.3% (8/10) | −10.3% (10/10) | −5.7% (8/10) | +3.5% (5/10) | +| windows-2022 | −5.7% (10/10) | −9.4% (10/10) | −6.7% (10/10) | −2.1% (7/10) | +| bench, x86_64 Linux | −9.5% (20/20) | −8.4% (20/20) | −11.0% (20/20) | −4.3% (13/20) | + +Full LTO is faster on every query-bound workload on every target. `file` +(about 0.1–0.3 s, mostly process start-up and file I/O) is within noise on +macOS. Hosted runners are shared machines; the bench rows are the controlled +measurement. + +## Evidence + +[`796-dist-lto/`](796-dist-lto/): `builds-*.json`, `runtime-*.json` (every +round) and `package-*.json` per target, plus the two scripts. diff --git a/docs/benchmarks/796-dist-lto/builds-aarch64-apple-darwin.json b/docs/benchmarks/796-dist-lto/builds-aarch64-apple-darwin.json new file mode 100644 index 0000000000..3e0febc794 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/builds-aarch64-apple-darwin.json @@ -0,0 +1,30 @@ +{ + "platform": "macOS-14.8.9-arm64-arm-64bit", + "machine": "arm64", + "builds": [ + { + "round": 0, + "lto": "thin", + "build_seconds": 42.01392458400005, + "bytes": 1372560 + }, + { + "round": 0, + "lto": "full", + "build_seconds": 40.54684737499997, + "bytes": 954192 + }, + { + "round": 1, + "lto": "full", + "build_seconds": 42.17448854100002, + "bytes": 954192 + }, + { + "round": 1, + "lto": "thin", + "build_seconds": 36.50212337500005, + "bytes": 1372560 + } + ] +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/builds-aarch64-unknown-linux-gnu.json b/docs/benchmarks/796-dist-lto/builds-aarch64-unknown-linux-gnu.json new file mode 100644 index 0000000000..b3621a4371 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/builds-aarch64-unknown-linux-gnu.json @@ -0,0 +1,30 @@ +{ + "platform": "Linux-6.8.0-1070-azure-aarch64-with-glibc2.35", + "machine": "aarch64", + "builds": [ + { + "round": 0, + "lto": "thin", + "build_seconds": 30.349435244999995, + "bytes": 1262544 + }, + { + "round": 0, + "lto": "full", + "build_seconds": 28.18664725100001, + "bytes": 1094504 + }, + { + "round": 1, + "lto": "full", + "build_seconds": 28.104224689000034, + "bytes": 1094504 + }, + { + "round": 1, + "lto": "thin", + "build_seconds": 25.75162138500002, + "bytes": 1262544 + } + ] +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/builds-bench-x86_64-linux.json b/docs/benchmarks/796-dist-lto/builds-bench-x86_64-linux.json new file mode 100644 index 0000000000..e046450ed8 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/builds-bench-x86_64-linux.json @@ -0,0 +1,30 @@ +{ + "platform": "Linux-6.8.0-139-generic-x86_64-with-glibc2.39", + "machine": "x86_64", + "builds": [ + { + "round": 0, + "lto": "thin", + "build_seconds": 27.877472235122696, + "bytes": 1501232 + }, + { + "round": 0, + "lto": "full", + "build_seconds": 30.649512137984857, + "bytes": 1262584 + }, + { + "round": 1, + "lto": "full", + "build_seconds": 30.725669295992702, + "bytes": 1262584 + }, + { + "round": 1, + "lto": "thin", + "build_seconds": 27.925453558098525, + "bytes": 1501232 + } + ] +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/builds-x86_64-apple-darwin.json b/docs/benchmarks/796-dist-lto/builds-x86_64-apple-darwin.json new file mode 100644 index 0000000000..22b0bbaf24 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/builds-x86_64-apple-darwin.json @@ -0,0 +1,30 @@ +{ + "platform": "macOS-15.7.9-x86_64-i386-64bit", + "machine": "x86_64", + "builds": [ + { + "round": 0, + "lto": "thin", + "build_seconds": 123.61216050499996, + "bytes": 1503392 + }, + { + "round": 0, + "lto": "full", + "build_seconds": 96.794796571, + "bytes": 1075840 + }, + { + "round": 1, + "lto": "full", + "build_seconds": 76.51469797699997, + "bytes": 1075840 + }, + { + "round": 1, + "lto": "thin", + "build_seconds": 67.28196448799997, + "bytes": 1503392 + } + ] +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/builds-x86_64-pc-windows-msvc.json b/docs/benchmarks/796-dist-lto/builds-x86_64-pc-windows-msvc.json new file mode 100644 index 0000000000..38d4573d1d --- /dev/null +++ b/docs/benchmarks/796-dist-lto/builds-x86_64-pc-windows-msvc.json @@ -0,0 +1,30 @@ +{ + "platform": "Windows-2022Server-10.0.20348-SP0", + "machine": "AMD64", + "builds": [ + { + "round": 0, + "lto": "thin", + "build_seconds": 63.82672539999999, + "bytes": 1041920 + }, + { + "round": 0, + "lto": "full", + "build_seconds": 46.1428391, + "bytes": 963072 + }, + { + "round": 1, + "lto": "full", + "build_seconds": 47.27537620000004, + "bytes": 963072 + }, + { + "round": 1, + "lto": "thin", + "build_seconds": 45.59298579999995, + "bytes": 1041920 + } + ] +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/builds-x86_64-unknown-linux-gnu.json b/docs/benchmarks/796-dist-lto/builds-x86_64-unknown-linux-gnu.json new file mode 100644 index 0000000000..38d596393a --- /dev/null +++ b/docs/benchmarks/796-dist-lto/builds-x86_64-unknown-linux-gnu.json @@ -0,0 +1,30 @@ +{ + "platform": "Linux-6.8.0-1070-azure-x86_64-with-glibc2.35", + "machine": "x86_64", + "builds": [ + { + "round": 0, + "lto": "thin", + "build_seconds": 43.43511368700001, + "bytes": 1501232 + }, + { + "round": 0, + "lto": "full", + "build_seconds": 30.330564745999993, + "bytes": 1262584 + }, + { + "round": 1, + "lto": "full", + "build_seconds": 30.577716478000013, + "bytes": 1262584 + }, + { + "round": 1, + "lto": "thin", + "build_seconds": 28.490207176000013, + "bytes": 1501232 + } + ] +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/builds.py b/docs/benchmarks/796-dist-lto/builds.py new file mode 100644 index 0000000000..4144f34e6e --- /dev/null +++ b/docs/benchmarks/796-dist-lto/builds.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +"""Time clean thin- and full-LTO `dist` builds, two rounds, alternating (#796). + +Usage: builds.py OUTPUT_JSON (from the repository root; copies each binary +to bins/thin-minigraf and bins/full-minigraf for runtime.py) +""" +import json, os, platform, shutil, subprocess, sys, time +exe = "minigraf.exe" if os.name == "nt" else "minigraf" +rows = [] +for rnd, order in enumerate([("thin", "full"), ("full", "thin")]): + for label in order: + tdir = f"tgt-{label}-{rnd}" + env = dict(os.environ) + if label == "thin": + env["CARGO_PROFILE_DIST_LTO"] = "thin" + start = time.perf_counter() + subprocess.run(["cargo", "build", "--locked", "--profile", "dist", "--target-dir", tdir], env=env, check=True) + secs = time.perf_counter() - start + size = os.path.getsize(os.path.join(tdir, "dist", exe)) + rows.append({"round": rnd, "lto": label, "build_seconds": secs, "bytes": size}) + print(rows[-1], flush=True) + os.makedirs("bins", exist_ok=True) + shutil.copy(os.path.join(tdir, "dist", exe), os.path.join("bins", f"{label}-{exe}")) + shutil.rmtree(tdir) +json.dump({"platform": platform.platform(), "machine": platform.machine(), "builds": rows}, + open(sys.argv[1], "w"), indent=2) diff --git a/docs/benchmarks/796-dist-lto/package-aarch64-apple-darwin.json b/docs/benchmarks/796-dist-lto/package-aarch64-apple-darwin.json new file mode 100644 index 0000000000..8afdbf06bc --- /dev/null +++ b/docs/benchmarks/796-dist-lto/package-aarch64-apple-darwin.json @@ -0,0 +1,7 @@ +{ + "target": "aarch64-apple-darwin", + "packaged_bytes": 954208, + "full_bytes": 954192, + "thin_bytes": 1372560, + "packaged_equals_full": false +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/package-aarch64-unknown-linux-gnu.json b/docs/benchmarks/796-dist-lto/package-aarch64-unknown-linux-gnu.json new file mode 100644 index 0000000000..ac0c23143e --- /dev/null +++ b/docs/benchmarks/796-dist-lto/package-aarch64-unknown-linux-gnu.json @@ -0,0 +1,7 @@ +{ + "target": "aarch64-unknown-linux-gnu", + "packaged_bytes": 1094504, + "full_bytes": 1094504, + "thin_bytes": 1262544, + "packaged_equals_full": false +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/package-x86_64-apple-darwin.json b/docs/benchmarks/796-dist-lto/package-x86_64-apple-darwin.json new file mode 100644 index 0000000000..fdb20c23d3 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/package-x86_64-apple-darwin.json @@ -0,0 +1,7 @@ +{ + "target": "x86_64-apple-darwin", + "packaged_bytes": 1075840, + "full_bytes": 1075840, + "thin_bytes": 1503392, + "packaged_equals_full": false +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/package-x86_64-pc-windows-msvc.json b/docs/benchmarks/796-dist-lto/package-x86_64-pc-windows-msvc.json new file mode 100644 index 0000000000..b373415986 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/package-x86_64-pc-windows-msvc.json @@ -0,0 +1,7 @@ +{ + "target": "x86_64-pc-windows-msvc", + "packaged_bytes": 1060864, + "full_bytes": 963072, + "thin_bytes": 1041920, + "packaged_equals_full": false +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/package-x86_64-unknown-linux-gnu.json b/docs/benchmarks/796-dist-lto/package-x86_64-unknown-linux-gnu.json new file mode 100644 index 0000000000..4ac4540d48 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/package-x86_64-unknown-linux-gnu.json @@ -0,0 +1,7 @@ +{ + "target": "x86_64-unknown-linux-gnu", + "packaged_bytes": 1262584, + "full_bytes": 1262584, + "thin_bytes": 1501232, + "packaged_equals_full": false +} \ No newline at end of file diff --git a/docs/benchmarks/796-dist-lto/runtime-aarch64-apple-darwin.json b/docs/benchmarks/796-dist-lto/runtime-aarch64-apple-darwin.json new file mode 100644 index 0000000000..d5e9b8614e --- /dev/null +++ b/docs/benchmarks/796-dist-lto/runtime-aarch64-apple-darwin.json @@ -0,0 +1,318 @@ +{ + "platform": "macOS-14.8.9-arm64-arm-64bit", + "machine": "arm64", + "thin_bytes": 1372560, + "full_bytes": 954192, + "summary": { + "count": { + "thin_median_seconds": 1.09925091650004, + "full_median_seconds": 1.021694562499988, + "median_delta": -0.06280140502508502, + "full_faster_rounds": 8, + "rounds": 10 + }, + "recursive": { + "thin_median_seconds": 2.4116447499999936, + "full_median_seconds": 2.1458246040000404, + "median_delta": -0.10328648622553216, + "full_faster_rounds": 10, + "rounds": 10 + }, + "aggregate": { + "thin_median_seconds": 1.7083636874999968, + "full_median_seconds": 1.6265974589999814, + "median_delta": -0.056814868801908947, + "full_faster_rounds": 8, + "rounds": 10 + }, + "file": { + "thin_median_seconds": 0.18140039549999187, + "full_median_seconds": 0.14794112499998846, + "median_delta": 0.03486865384493126, + "full_faster_rounds": 5, + "rounds": 10 + } + }, + "rows": [ + { + "round": 0, + "workload": "count", + "first": "thin", + "thin_seconds": 1.0427824590000228, + "full_seconds": 1.004591416999972 + }, + { + "round": 0, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.4500719580000236, + "full_seconds": 2.2079753749999895 + }, + { + "round": 0, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.851925250000022, + "full_seconds": 1.9152849579999724 + }, + { + "round": 0, + "workload": "file", + "first": "thin", + "thin_seconds": 0.18412916599999107, + "full_seconds": 0.1341042499999503 + }, + { + "round": 1, + "workload": "count", + "first": "full", + "full_seconds": 1.0356863750000116, + "thin_seconds": 1.0924126250000086 + }, + { + "round": 1, + "workload": "recursive", + "first": "full", + "full_seconds": 2.221515457999999, + "thin_seconds": 2.2795635420000053 + }, + { + "round": 1, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.5613661250000064, + "thin_seconds": 1.7125398750000045 + }, + { + "round": 1, + "workload": "file", + "first": "full", + "full_seconds": 0.15059008399998675, + "thin_seconds": 0.11569916700000249 + }, + { + "round": 2, + "workload": "count", + "first": "thin", + "thin_seconds": 1.0826588329999822, + "full_seconds": 1.028760458000022 + }, + { + "round": 2, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.394340374999956, + "full_seconds": 1.9770639589999632 + }, + { + "round": 2, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.6358549999999923, + "full_seconds": 1.5612959580000165 + }, + { + "round": 2, + "workload": "file", + "first": "thin", + "thin_seconds": 0.17867162499999267, + "full_seconds": 0.1724199580000345 + }, + { + "round": 3, + "workload": "count", + "first": "full", + "full_seconds": 0.9855948329999933, + "thin_seconds": 1.122121959000026 + }, + { + "round": 3, + "workload": "recursive", + "first": "full", + "full_seconds": 2.0578616669999974, + "thin_seconds": 2.428949125000031 + }, + { + "round": 3, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.642247709000003, + "thin_seconds": 1.704187499999989 + }, + { + "round": 3, + "workload": "file", + "first": "full", + "full_seconds": 0.2993111250000311, + "thin_seconds": 0.1901356669999359 + }, + { + "round": 4, + "workload": "count", + "first": "thin", + "thin_seconds": 1.1377254999999877, + "full_seconds": 1.0156859999999597 + }, + { + "round": 4, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.494053667000003, + "full_seconds": 2.036988375000078 + }, + { + "round": 4, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.7880764999999883, + "full_seconds": 1.666394834000016 + }, + { + "round": 4, + "workload": "file", + "first": "thin", + "thin_seconds": 0.20209608300001491, + "full_seconds": 0.14529216599999017 + }, + { + "round": 5, + "workload": "count", + "first": "full", + "full_seconds": 1.0277031250000164, + "thin_seconds": 1.1527194170000712 + }, + { + "round": 5, + "workload": "recursive", + "first": "full", + "full_seconds": 2.28732541699992, + "thin_seconds": 2.4720212089999904 + }, + { + "round": 5, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.7562462500000038, + "thin_seconds": 1.6590280000000348 + }, + { + "round": 5, + "workload": "file", + "first": "full", + "full_seconds": 0.19266154100000676, + "thin_seconds": 0.14861579199998687 + }, + { + "round": 6, + "workload": "count", + "first": "thin", + "thin_seconds": 0.9547323750000487, + "full_seconds": 0.9675372499999639 + }, + { + "round": 6, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.2409171670000205, + "full_seconds": 2.1256821670000363 + }, + { + "round": 6, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.7528017079999927, + "full_seconds": 1.4792965410000534 + }, + { + "round": 6, + "workload": "file", + "first": "thin", + "thin_seconds": 0.2215858339999386, + "full_seconds": 0.11868462499990073 + }, + { + "round": 7, + "workload": "count", + "first": "full", + "full_seconds": 1.0048796659999653, + "thin_seconds": 1.1060892080000713 + }, + { + "round": 7, + "workload": "recursive", + "first": "full", + "full_seconds": 2.0800972499999943, + "thin_seconds": 2.3313227920000372 + }, + { + "round": 7, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.61094720899996, + "thin_seconds": 1.6787476249999145 + }, + { + "round": 7, + "workload": "file", + "first": "full", + "full_seconds": 0.14243733300008898, + "thin_seconds": 0.1289344169999822 + }, + { + "round": 8, + "workload": "count", + "first": "thin", + "thin_seconds": 1.0640292500000896, + "full_seconds": 1.1400921250000238 + }, + { + "round": 8, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.3394637090000288, + "full_seconds": 2.1659670410000444 + }, + { + "round": 8, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.9138694170000008, + "full_seconds": 1.7647396670000717 + }, + { + "round": 8, + "workload": "file", + "first": "thin", + "thin_seconds": 0.27955079100001967, + "full_seconds": 0.14040179200003422 + }, + { + "round": 9, + "workload": "count", + "first": "full", + "full_seconds": 1.1490175000000136, + "thin_seconds": 1.2404047090000176 + }, + { + "round": 9, + "workload": "recursive", + "first": "full", + "full_seconds": 2.2090076250000266, + "thin_seconds": 2.5186740000000327 + }, + { + "round": 9, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.5717696250000017, + "thin_seconds": 1.7009351250000009 + }, + { + "round": 9, + "workload": "file", + "first": "full", + "full_seconds": 0.22578454099993905, + "thin_seconds": 0.1353671670000267 + } + ] +} diff --git a/docs/benchmarks/796-dist-lto/runtime-aarch64-unknown-linux-gnu.json b/docs/benchmarks/796-dist-lto/runtime-aarch64-unknown-linux-gnu.json new file mode 100644 index 0000000000..2efaa88401 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/runtime-aarch64-unknown-linux-gnu.json @@ -0,0 +1,318 @@ +{ + "platform": "Linux-6.8.0-1070-azure-aarch64-with-glibc2.35", + "machine": "aarch64", + "thin_bytes": 1262544, + "full_bytes": 1094504, + "summary": { + "count": { + "thin_median_seconds": 0.8065925984999751, + "full_median_seconds": 0.7290377045000014, + "median_delta": -0.09724959214244089, + "full_faster_rounds": 10, + "rounds": 10 + }, + "recursive": { + "thin_median_seconds": 1.9647676900000022, + "full_median_seconds": 1.6517394504999743, + "median_delta": -0.15969115188950606, + "full_faster_rounds": 10, + "rounds": 10 + }, + "aggregate": { + "thin_median_seconds": 1.4402475419999803, + "full_median_seconds": 1.186429642500002, + "median_delta": -0.17409752329127332, + "full_faster_rounds": 10, + "rounds": 10 + }, + "file": { + "thin_median_seconds": 0.08774353650002809, + "full_median_seconds": 0.08436250450000671, + "median_delta": -0.03630165306053784, + "full_faster_rounds": 10, + "rounds": 10 + } + }, + "rows": [ + { + "round": 0, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8054759869999657, + "full_seconds": 0.7358949440000515 + }, + { + "round": 0, + "workload": "recursive", + "first": "thin", + "thin_seconds": 1.984532239000032, + "full_seconds": 1.6495431980000035 + }, + { + "round": 0, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.4529459270000302, + "full_seconds": 1.2154634780000038 + }, + { + "round": 0, + "workload": "file", + "first": "thin", + "thin_seconds": 0.09148773600003324, + "full_seconds": 0.08448692199999641 + }, + { + "round": 1, + "workload": "count", + "first": "full", + "full_seconds": 0.7265224880000005, + "thin_seconds": 0.8066788979999728 + }, + { + "round": 1, + "workload": "recursive", + "first": "full", + "full_seconds": 1.6501922710000372, + "thin_seconds": 1.9654128710000123 + }, + { + "round": 1, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.189351638000005, + "thin_seconds": 1.4441946389999885 + }, + { + "round": 1, + "workload": "file", + "first": "full", + "full_seconds": 0.08465042699998548, + "thin_seconds": 0.08942773100000068 + }, + { + "round": 2, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8064718410000182, + "full_seconds": 0.7329282780000312 + }, + { + "round": 2, + "workload": "recursive", + "first": "thin", + "thin_seconds": 1.9693237839999824, + "full_seconds": 1.6509113199999774 + }, + { + "round": 2, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.4450670560000276, + "full_seconds": 1.2053072150000048 + }, + { + "round": 2, + "workload": "file", + "first": "thin", + "thin_seconds": 0.090626039999961, + "full_seconds": 0.08773739800000158 + }, + { + "round": 3, + "workload": "count", + "first": "full", + "full_seconds": 0.7315529210000022, + "thin_seconds": 0.8084647969999992 + }, + { + "round": 3, + "workload": "recursive", + "first": "full", + "full_seconds": 1.6503209780000248, + "thin_seconds": 1.964122508999992 + }, + { + "round": 3, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.2243004570000267, + "thin_seconds": 1.4780812040000342 + }, + { + "round": 3, + "workload": "file", + "first": "full", + "full_seconds": 0.08538965100001406, + "thin_seconds": 0.08870834400005378 + }, + { + "round": 4, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8117417180000075, + "full_seconds": 0.7358459870000047 + }, + { + "round": 4, + "workload": "recursive", + "first": "thin", + "thin_seconds": 1.9546583750000082, + "full_seconds": 1.66436982700003 + }, + { + "round": 4, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.4260862500000258, + "full_seconds": 1.1562960250000174 + }, + { + "round": 4, + "workload": "file", + "first": "thin", + "thin_seconds": 0.08616068600002791, + "full_seconds": 0.08373783700000104 + }, + { + "round": 5, + "workload": "count", + "first": "full", + "full_seconds": 0.7252127419999965, + "thin_seconds": 0.8063866880000319 + }, + { + "round": 5, + "workload": "recursive", + "first": "full", + "full_seconds": 1.6495868940000378, + "thin_seconds": 1.9531790760000263 + }, + { + "round": 5, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1774334209999893, + "thin_seconds": 1.4223514060000184 + }, + { + "round": 5, + "workload": "file", + "first": "full", + "full_seconds": 0.084238087000017, + "thin_seconds": 0.08611870800001498 + }, + { + "round": 6, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8033116550000159, + "full_seconds": 0.7323000559999855 + }, + { + "round": 6, + "workload": "recursive", + "first": "thin", + "thin_seconds": 1.9795401689999608, + "full_seconds": 1.6525675809999711 + }, + { + "round": 6, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.4249518799999805, + "full_seconds": 1.1974268829999914 + }, + { + "round": 6, + "workload": "file", + "first": "thin", + "thin_seconds": 0.08596053899998424, + "full_seconds": 0.08252075000001469 + }, + { + "round": 7, + "workload": "count", + "first": "full", + "full_seconds": 0.719665410999994, + "thin_seconds": 0.8065062989999774 + }, + { + "round": 7, + "workload": "recursive", + "first": "full", + "full_seconds": 1.6624207529999921, + "thin_seconds": 1.9781668960000047 + }, + { + "round": 7, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1820858959999896, + "thin_seconds": 1.4957164260000013 + }, + { + "round": 7, + "workload": "file", + "first": "full", + "full_seconds": 0.08372480999997833, + "thin_seconds": 0.08677872900000239 + }, + { + "round": 8, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8077915979999943, + "full_seconds": 0.7199501069999883 + }, + { + "round": 8, + "workload": "recursive", + "first": "thin", + "thin_seconds": 1.9581330750000348, + "full_seconds": 1.6624956190000262 + }, + { + "round": 8, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.4363004449999721, + "full_seconds": 1.183507646999999 + }, + { + "round": 8, + "workload": "file", + "first": "thin", + "thin_seconds": 0.08906997799999772, + "full_seconds": 0.0836688450000338 + }, + { + "round": 9, + "workload": "count", + "first": "full", + "full_seconds": 0.7259991380000201, + "thin_seconds": 0.8125704180000071 + }, + { + "round": 9, + "workload": "recursive", + "first": "full", + "full_seconds": 1.6580221939999547, + "thin_seconds": 1.9597507729999961 + }, + { + "round": 9, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1757005420000155, + "thin_seconds": 1.4282682090000094 + }, + { + "round": 9, + "workload": "file", + "first": "full", + "full_seconds": 0.08469774700000698, + "thin_seconds": 0.08492995900002143 + } + ] +} diff --git a/docs/benchmarks/796-dist-lto/runtime-bench-x86_64-linux.json b/docs/benchmarks/796-dist-lto/runtime-bench-x86_64-linux.json new file mode 100644 index 0000000000..edcd7c3ec6 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/runtime-bench-x86_64-linux.json @@ -0,0 +1,598 @@ +{ + "platform": "Linux-6.8.0-139-generic-x86_64-with-glibc2.39", + "machine": "x86_64", + "thin_bytes": 1501232, + "full_bytes": 1262584, + "summary": { + "count": { + "thin_median_seconds": 0.9112110714195296, + "full_median_seconds": 0.8229225114919245, + "median_delta": -0.09457024954027349, + "full_faster_rounds": 20, + "rounds": 20 + }, + "recursive": { + "thin_median_seconds": 2.0051562056178227, + "full_median_seconds": 1.8357619574526325, + "median_delta": -0.08411533528089893, + "full_faster_rounds": 20, + "rounds": 20 + }, + "aggregate": { + "thin_median_seconds": 1.3446265244856477, + "full_median_seconds": 1.1936839683912694, + "median_delta": -0.10973364713964717, + "full_faster_rounds": 20, + "rounds": 20 + }, + "file": { + "thin_median_seconds": 0.1045257009100169, + "full_median_seconds": 0.10370832460466772, + "median_delta": -0.04292184286123857, + "full_faster_rounds": 13, + "rounds": 20 + } + }, + "rows": [ + { + "round": 0, + "workload": "count", + "first": "thin", + "thin_seconds": 0.9082806739024818, + "full_seconds": 0.8333624650258571 + }, + { + "round": 0, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.002463721903041, + "full_seconds": 1.8308112630620599 + }, + { + "round": 0, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.3145666341297328, + "full_seconds": 1.1878531468100846 + }, + { + "round": 0, + "workload": "file", + "first": "thin", + "thin_seconds": 0.10615936410613358, + "full_seconds": 0.09547481592744589 + }, + { + "round": 1, + "workload": "count", + "first": "full", + "full_seconds": 0.8221740201115608, + "thin_seconds": 0.8919859488960356 + }, + { + "round": 1, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8159201201051474, + "thin_seconds": 1.984391778940335 + }, + { + "round": 1, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1995556470938027, + "thin_seconds": 1.3415395698975772 + }, + { + "round": 1, + "workload": "file", + "first": "full", + "full_seconds": 0.09595895395614207, + "thin_seconds": 0.10113555286079645 + }, + { + "round": 2, + "workload": "count", + "first": "thin", + "thin_seconds": 0.899044665042311, + "full_seconds": 0.8152627740055323 + }, + { + "round": 2, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.0353374870028347, + "full_seconds": 1.8357521858997643 + }, + { + "round": 2, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.3325004081707448, + "full_seconds": 1.1940157958306372 + }, + { + "round": 2, + "workload": "file", + "first": "thin", + "thin_seconds": 0.11791193089447916, + "full_seconds": 0.11382522992789745 + }, + { + "round": 3, + "workload": "count", + "first": "full", + "full_seconds": 0.8240059181116521, + "thin_seconds": 0.9415027438662946 + }, + { + "round": 3, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8309049480594695, + "thin_seconds": 1.9905498418956995 + }, + { + "round": 3, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1770644790958613, + "thin_seconds": 1.3211249660234898 + }, + { + "round": 3, + "workload": "file", + "first": "full", + "full_seconds": 0.09611584292724729, + "thin_seconds": 0.09806471015326679 + }, + { + "round": 4, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8929509529843926, + "full_seconds": 0.8309894341509789 + }, + { + "round": 4, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.014302192023024, + "full_seconds": 1.8233966508414596 + }, + { + "round": 4, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.3485703559126705, + "full_seconds": 1.1885168391745538 + }, + { + "round": 4, + "workload": "file", + "first": "thin", + "thin_seconds": 0.10504209692589939, + "full_seconds": 0.0919572738930583 + }, + { + "round": 5, + "workload": "count", + "first": "full", + "full_seconds": 0.8199994969181716, + "thin_seconds": 0.888574852142483 + }, + { + "round": 5, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8370296750217676, + "thin_seconds": 1.9852674650028348 + }, + { + "round": 5, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1789343019481748, + "thin_seconds": 1.3367248140275478 + }, + { + "round": 5, + "workload": "file", + "first": "full", + "full_seconds": 0.11388847487978637, + "thin_seconds": 0.09935243311338127 + }, + { + "round": 6, + "workload": "count", + "first": "thin", + "thin_seconds": 0.9265079239849001, + "full_seconds": 0.8306846120394766 + }, + { + "round": 6, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.0026577771641314, + "full_seconds": 1.8357717290055007 + }, + { + "round": 6, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.3555369128007442, + "full_seconds": 1.175070057157427 + }, + { + "round": 6, + "workload": "file", + "first": "thin", + "thin_seconds": 0.11799688497558236, + "full_seconds": 0.10044744703918695 + }, + { + "round": 7, + "workload": "count", + "first": "full", + "full_seconds": 0.8178406869992614, + "thin_seconds": 0.9174320159945637 + }, + { + "round": 7, + "workload": "recursive", + "first": "full", + "full_seconds": 1.839640323072672, + "thin_seconds": 1.984754758886993 + }, + { + "round": 7, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1694469689391553, + "thin_seconds": 1.3604419929906726 + }, + { + "round": 7, + "workload": "file", + "first": "full", + "full_seconds": 0.10696920217014849, + "thin_seconds": 0.0999623448587954 + }, + { + "round": 8, + "workload": "count", + "first": "thin", + "thin_seconds": 0.9141414689365774, + "full_seconds": 0.8405674330424517 + }, + { + "round": 8, + "workload": "recursive", + "first": "thin", + "thin_seconds": 1.9856762799900025, + "full_seconds": 1.826378840021789 + }, + { + "round": 8, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.3444078410975635, + "full_seconds": 1.195953629910946 + }, + { + "round": 8, + "workload": "file", + "first": "thin", + "thin_seconds": 0.11532486695796251, + "full_seconds": 0.09438792685978115 + }, + { + "round": 9, + "workload": "count", + "first": "full", + "full_seconds": 0.8122644161339849, + "thin_seconds": 0.8896294559817761 + }, + { + "round": 9, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8489412090275437, + "thin_seconds": 1.9859013240784407 + }, + { + "round": 9, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.2078395220451057, + "thin_seconds": 1.3435285708401352 + }, + { + "round": 9, + "workload": "file", + "first": "full", + "full_seconds": 0.11226397496648133, + "thin_seconds": 0.11405856092460454 + }, + { + "round": 10, + "workload": "count", + "first": "thin", + "thin_seconds": 0.9176090988330543, + "full_seconds": 0.8236710028722882 + }, + { + "round": 10, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.007654634071514, + "full_seconds": 1.8155673209112138 + }, + { + "round": 10, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.368191652931273, + "full_seconds": 1.1960320230573416 + }, + { + "round": 10, + "workload": "file", + "first": "thin", + "thin_seconds": 0.0985605320893228, + "full_seconds": 0.11044493317604065 + }, + { + "round": 11, + "workload": "count", + "first": "full", + "full_seconds": 0.8505722810514271, + "thin_seconds": 0.9030396270100027 + }, + { + "round": 11, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8132280190475285, + "thin_seconds": 2.032462195958942 + }, + { + "round": 11, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1903329838532954, + "thin_seconds": 1.3533087538089603 + }, + { + "round": 11, + "workload": "file", + "first": "full", + "full_seconds": 0.11036781710572541, + "thin_seconds": 0.09974110987968743 + }, + { + "round": 12, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8990113870240748, + "full_seconds": 0.812094900989905 + }, + { + "round": 12, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.0077650509774685, + "full_seconds": 1.855077059008181 + }, + { + "round": 12, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.346482089953497, + "full_seconds": 1.2535266450140625 + }, + { + "round": 12, + "workload": "file", + "first": "thin", + "thin_seconds": 0.10179650806821883, + "full_seconds": 0.09531106101348996 + }, + { + "round": 13, + "workload": "count", + "first": "full", + "full_seconds": 0.8155235601589084, + "thin_seconds": 0.916455791098997 + }, + { + "round": 13, + "workload": "recursive", + "first": "full", + "full_seconds": 1.839108760934323, + "thin_seconds": 1.9977484690025449 + }, + { + "round": 13, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.213385031092912, + "thin_seconds": 1.3305577971041203 + }, + { + "round": 13, + "workload": "file", + "first": "full", + "full_seconds": 0.11255299905315042, + "thin_seconds": 0.11936055799014866 + }, + { + "round": 14, + "workload": "count", + "first": "thin", + "thin_seconds": 0.9003544831648469, + "full_seconds": 0.8193739741109312 + }, + { + "round": 14, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.0017353740986437, + "full_seconds": 1.8498175230342895 + }, + { + "round": 14, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.3448452078737319, + "full_seconds": 1.1840027729049325 + }, + { + "round": 14, + "workload": "file", + "first": "thin", + "thin_seconds": 0.0986465229652822, + "full_seconds": 0.11113752494566143 + }, + { + "round": 15, + "workload": "count", + "first": "full", + "full_seconds": 0.8293977179564536, + "thin_seconds": 0.9250980059150606 + }, + { + "round": 15, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8257520920597017, + "thin_seconds": 2.0104342920240015 + }, + { + "round": 15, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1909951770212501, + "thin_seconds": 1.3416078761219978 + }, + { + "round": 15, + "workload": "file", + "first": "full", + "full_seconds": 0.11100369389168918, + "thin_seconds": 0.09902136190794408 + }, + { + "round": 16, + "workload": "count", + "first": "thin", + "thin_seconds": 0.9148809539619833, + "full_seconds": 0.8294367010239512 + }, + { + "round": 16, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.023608695017174, + "full_seconds": 1.8480971560347825 + }, + { + "round": 16, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.348503856221214, + "full_seconds": 1.20937992609106 + }, + { + "round": 16, + "workload": "file", + "first": "thin", + "thin_seconds": 0.11941808997653425, + "full_seconds": 0.0948616610839963 + }, + { + "round": 17, + "workload": "count", + "first": "full", + "full_seconds": 0.8272885850165039, + "thin_seconds": 0.914885840145871 + }, + { + "round": 17, + "workload": "recursive", + "first": "full", + "full_seconds": 1.843647510977462, + "thin_seconds": 2.0260151638649404 + }, + { + "round": 17, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.209240279858932, + "thin_seconds": 1.3481100290082395 + }, + { + "round": 17, + "workload": "file", + "first": "full", + "full_seconds": 0.0946687541436404, + "thin_seconds": 0.11928212898783386 + }, + { + "round": 18, + "workload": "count", + "first": "thin", + "thin_seconds": 0.9179908039513975, + "full_seconds": 0.8208302229177207 + }, + { + "round": 18, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.0208404168952256, + "full_seconds": 1.866374998819083 + }, + { + "round": 18, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.3631259282119572, + "full_seconds": 1.1933521409519017 + }, + { + "round": 18, + "workload": "file", + "first": "thin", + "thin_seconds": 0.1040093048941344, + "full_seconds": 0.09420846402645111 + }, + { + "round": 19, + "workload": "count", + "first": "full", + "full_seconds": 0.8194154840894043, + "thin_seconds": 0.9081678900402039 + }, + { + "round": 19, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8243243978358805, + "thin_seconds": 2.0523396539501846 + }, + { + "round": 19, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.1967494110576808, + "thin_seconds": 1.3357927289325744 + }, + { + "round": 19, + "workload": "file", + "first": "full", + "full_seconds": 0.11263087205588818, + "thin_seconds": 0.10545822093263268 + } + ] +} diff --git a/docs/benchmarks/796-dist-lto/runtime-x86_64-apple-darwin.json b/docs/benchmarks/796-dist-lto/runtime-x86_64-apple-darwin.json new file mode 100644 index 0000000000..64a4330434 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/runtime-x86_64-apple-darwin.json @@ -0,0 +1,318 @@ +{ + "platform": "macOS-15.7.9-x86_64-i386-64bit", + "machine": "x86_64", + "thin_bytes": 1503392, + "full_bytes": 1075840, + "summary": { + "count": { + "thin_median_seconds": 1.6167102175000423, + "full_median_seconds": 1.570452620000026, + "median_delta": -0.07406277256741967, + "full_faster_rounds": 7, + "rounds": 10 + }, + "recursive": { + "thin_median_seconds": 3.249891615000024, + "full_median_seconds": 3.1613978254999893, + "median_delta": -0.03883773868729207, + "full_faster_rounds": 9, + "rounds": 10 + }, + "aggregate": { + "thin_median_seconds": 2.5373529744999814, + "full_median_seconds": 2.3799129920000155, + "median_delta": -0.07814169172762908, + "full_faster_rounds": 8, + "rounds": 10 + }, + "file": { + "thin_median_seconds": 0.2676408235000167, + "full_median_seconds": 0.28202883500000553, + "median_delta": -0.014652766776749315, + "full_faster_rounds": 6, + "rounds": 10 + } + }, + "rows": [ + { + "round": 0, + "workload": "count", + "first": "thin", + "thin_seconds": 2.042681894999987, + "full_seconds": 1.6903519290000304 + }, + { + "round": 0, + "workload": "recursive", + "first": "thin", + "thin_seconds": 3.613315501000102, + "full_seconds": 3.5374387860000525 + }, + { + "round": 0, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 2.8230884440000636, + "full_seconds": 2.2429084190000594 + }, + { + "round": 0, + "workload": "file", + "first": "thin", + "thin_seconds": 0.2905681419999837, + "full_seconds": 0.3035844470000484 + }, + { + "round": 1, + "workload": "count", + "first": "full", + "full_seconds": 2.0165160239999977, + "thin_seconds": 1.8217172710000114 + }, + { + "round": 1, + "workload": "recursive", + "first": "full", + "full_seconds": 3.771593715999984, + "thin_seconds": 3.7995206089999556 + }, + { + "round": 1, + "workload": "aggregate", + "first": "full", + "full_seconds": 3.034699142000022, + "thin_seconds": 3.077758820999975 + }, + { + "round": 1, + "workload": "file", + "first": "full", + "full_seconds": 0.29465187400001014, + "thin_seconds": 0.31619144499995855 + }, + { + "round": 2, + "workload": "count", + "first": "thin", + "thin_seconds": 1.8080785329999571, + "full_seconds": 1.579364794000071 + }, + { + "round": 2, + "workload": "recursive", + "first": "thin", + "thin_seconds": 3.580578138999954, + "full_seconds": 3.2220801109999684 + }, + { + "round": 2, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 2.6081774460000133, + "full_seconds": 2.2151098159999947 + }, + { + "round": 2, + "workload": "file", + "first": "thin", + "thin_seconds": 0.2617930100000194, + "full_seconds": 0.2578700460001073 + }, + { + "round": 3, + "workload": "count", + "first": "full", + "full_seconds": 1.4817081080000207, + "thin_seconds": 1.635197276000099 + }, + { + "round": 3, + "workload": "recursive", + "first": "full", + "full_seconds": 4.5242053979999355, + "thin_seconds": 3.103850980999937 + }, + { + "round": 3, + "workload": "aggregate", + "first": "full", + "full_seconds": 2.3734257360000584, + "thin_seconds": 2.721014928000045 + }, + { + "round": 3, + "workload": "file", + "first": "full", + "full_seconds": 0.23551653100003023, + "thin_seconds": 0.2441320809999752 + }, + { + "round": 4, + "workload": "count", + "first": "thin", + "thin_seconds": 1.448674485999959, + "full_seconds": 1.4053528659999301 + }, + { + "round": 4, + "workload": "recursive", + "first": "thin", + "thin_seconds": 3.1863853680000602, + "full_seconds": 3.10071554000001 + }, + { + "round": 4, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 2.4615813630000503, + "full_seconds": 2.354110872999968 + }, + { + "round": 4, + "workload": "file", + "first": "thin", + "thin_seconds": 0.30273182800010545, + "full_seconds": 0.28719117000002825 + }, + { + "round": 5, + "workload": "count", + "first": "full", + "full_seconds": 1.6590886610000553, + "thin_seconds": 1.5982231589999856 + }, + { + "round": 5, + "workload": "recursive", + "first": "full", + "full_seconds": 2.989568233, + "thin_seconds": 3.1495305820000112 + }, + { + "round": 5, + "workload": "aggregate", + "first": "full", + "full_seconds": 2.6685730849999345, + "thin_seconds": 2.4665285029999495 + }, + { + "round": 5, + "workload": "file", + "first": "full", + "full_seconds": 0.2768664999999828, + "thin_seconds": 0.24326489099996706 + }, + { + "round": 6, + "workload": "count", + "first": "thin", + "thin_seconds": 1.4925282629999401, + "full_seconds": 1.369529287999967 + }, + { + "round": 6, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.9445046240000465, + "full_seconds": 2.88333777999992 + }, + { + "round": 6, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 2.417272701999991, + "full_seconds": 2.145029157999943 + }, + { + "round": 6, + "workload": "file", + "first": "thin", + "thin_seconds": 0.23531973599995126, + "full_seconds": 0.2319498280000971 + }, + { + "round": 7, + "workload": "count", + "first": "full", + "full_seconds": 1.3726818560000993, + "thin_seconds": 1.4692336190000788 + }, + { + "round": 7, + "workload": "recursive", + "first": "full", + "full_seconds": 2.922739950999926, + "thin_seconds": 3.313397861999988 + }, + { + "round": 7, + "workload": "aggregate", + "first": "full", + "full_seconds": 2.3864002479999726, + "thin_seconds": 2.342798227000003 + }, + { + "round": 7, + "workload": "file", + "first": "full", + "full_seconds": 0.24777282499997, + "thin_seconds": 0.2462818230000039 + }, + { + "round": 8, + "workload": "count", + "first": "thin", + "thin_seconds": 1.5198911539999926, + "full_seconds": 1.5615404459999809 + }, + { + "round": 8, + "workload": "recursive", + "first": "thin", + "thin_seconds": 3.1129051199999367, + "full_seconds": 2.862503081 + }, + { + "round": 8, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 2.4074909199999865, + "full_seconds": 2.4051894959999345 + }, + { + "round": 8, + "workload": "file", + "first": "thin", + "thin_seconds": 0.3452108339999995, + "full_seconds": 0.33690674100000706 + }, + { + "round": 9, + "workload": "count", + "first": "full", + "full_seconds": 1.7192135849999204, + "thin_seconds": 1.9226454349999358 + }, + { + "round": 9, + "workload": "recursive", + "first": "full", + "full_seconds": 3.335998669999981, + "thin_seconds": 3.7662989520000565 + }, + { + "round": 9, + "workload": "aggregate", + "first": "full", + "full_seconds": 2.705998496999996, + "thin_seconds": 3.0611637929999915 + }, + { + "round": 9, + "workload": "file", + "first": "full", + "full_seconds": 0.3353323050000654, + "thin_seconds": 0.273488637000014 + } + ] +} diff --git a/docs/benchmarks/796-dist-lto/runtime-x86_64-pc-windows-msvc.json b/docs/benchmarks/796-dist-lto/runtime-x86_64-pc-windows-msvc.json new file mode 100644 index 0000000000..9866fa5e77 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/runtime-x86_64-pc-windows-msvc.json @@ -0,0 +1,318 @@ +{ + "platform": "Windows-2022Server-10.0.20348-SP0", + "machine": "AMD64", + "thin_bytes": 1041920, + "full_bytes": 963072, + "summary": { + "count": { + "thin_median_seconds": 1.110125050000022, + "full_median_seconds": 1.0427462499999933, + "median_delta": -0.057461271913029965, + "full_faster_rounds": 10, + "rounds": 10 + }, + "recursive": { + "thin_median_seconds": 2.491683249999994, + "full_median_seconds": 2.2593200999999965, + "median_delta": -0.09433677474916835, + "full_faster_rounds": 10, + "rounds": 10 + }, + "aggregate": { + "thin_median_seconds": 1.7080091499999526, + "full_median_seconds": 1.6023288000000093, + "median_delta": -0.0669607812552434, + "full_faster_rounds": 10, + "rounds": 10 + }, + "file": { + "thin_median_seconds": 0.295730849999984, + "full_median_seconds": 0.2927441500000043, + "median_delta": -0.020541605720975353, + "full_faster_rounds": 7, + "rounds": 10 + } + }, + "rows": [ + { + "round": 0, + "workload": "count", + "first": "thin", + "thin_seconds": 1.1175659999999539, + "full_seconds": 1.0501414999999952 + }, + { + "round": 0, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.490718099999981, + "full_seconds": 2.2639813999999774 + }, + { + "round": 0, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.7866693999999939, + "full_seconds": 1.6064464000000385 + }, + { + "round": 0, + "workload": "file", + "first": "thin", + "thin_seconds": 0.32682540000001836, + "full_seconds": 0.2918265000000133 + }, + { + "round": 1, + "workload": "count", + "first": "full", + "full_seconds": 1.0373177000000169, + "thin_seconds": 1.1074827000000482 + }, + { + "round": 1, + "workload": "recursive", + "first": "full", + "full_seconds": 2.26070390000001, + "thin_seconds": 2.501425100000006 + }, + { + "round": 1, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.5982111999999802, + "thin_seconds": 1.6894545999999764 + }, + { + "round": 1, + "workload": "file", + "first": "full", + "full_seconds": 0.2826084000000151, + "thin_seconds": 0.28846659999999247 + }, + { + "round": 2, + "workload": "count", + "first": "thin", + "thin_seconds": 1.1012644999999566, + "full_seconds": 1.04099819999999 + }, + { + "round": 2, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.4932465999999636, + "full_seconds": 2.2510194000000183 + }, + { + "round": 2, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.68931340000006, + "full_seconds": 1.569990100000041 + }, + { + "round": 2, + "workload": "file", + "first": "thin", + "thin_seconds": 0.29302559999996447, + "full_seconds": 0.279610899999966 + }, + { + "round": 3, + "workload": "count", + "first": "full", + "full_seconds": 1.0405751000000691, + "thin_seconds": 1.0986344000000372 + }, + { + "round": 3, + "workload": "recursive", + "first": "full", + "full_seconds": 2.2373124999999163, + "thin_seconds": 2.4741357000000335 + }, + { + "round": 3, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.5649452999999767, + "thin_seconds": 1.698925999999915 + }, + { + "round": 3, + "workload": "file", + "first": "full", + "full_seconds": 0.2832154000000173, + "thin_seconds": 0.2823873000000958 + }, + { + "round": 4, + "workload": "count", + "first": "thin", + "thin_seconds": 1.1096205000000054, + "full_seconds": 1.0481753000000253 + }, + { + "round": 4, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.49452389999999, + "full_seconds": 2.253387699999962 + }, + { + "round": 4, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.735294299999964, + "full_seconds": 1.6254721000000245 + }, + { + "round": 4, + "workload": "file", + "first": "thin", + "thin_seconds": 0.29486020000001645, + "full_seconds": 0.33984290000000783 + }, + { + "round": 5, + "workload": "count", + "first": "full", + "full_seconds": 1.06505889999994, + "thin_seconds": 1.1184549000000743 + }, + { + "round": 5, + "workload": "recursive", + "first": "full", + "full_seconds": 2.263769899999943, + "thin_seconds": 2.4806659000000764 + }, + { + "round": 5, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.5715446000000384, + "thin_seconds": 1.7170922999999902 + }, + { + "round": 5, + "workload": "file", + "first": "full", + "full_seconds": 0.30166699999995217, + "thin_seconds": 0.2854154000000335 + }, + { + "round": 6, + "workload": "count", + "first": "thin", + "thin_seconds": 1.1131092000000535, + "full_seconds": 1.0373678000000837 + }, + { + "round": 6, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.4926484000000073, + "full_seconds": 2.2624927999999045 + }, + { + "round": 6, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.6602521999999453, + "full_seconds": 1.6346929000000046 + }, + { + "round": 6, + "workload": "file", + "first": "thin", + "thin_seconds": 0.3057692999999517, + "full_seconds": 0.28275220000000445 + }, + { + "round": 7, + "workload": "count", + "first": "full", + "full_seconds": 1.0583642999999938, + "thin_seconds": 1.1094147999999677 + }, + { + "round": 7, + "workload": "recursive", + "first": "full", + "full_seconds": 2.257936299999983, + "thin_seconds": 2.493850199999997 + }, + { + "round": 7, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.6285652000000255, + "thin_seconds": 1.7561397000000625 + }, + { + "round": 7, + "workload": "file", + "first": "full", + "full_seconds": 0.3066096000000016, + "thin_seconds": 0.31311459999994895 + }, + { + "round": 8, + "workload": "count", + "first": "thin", + "thin_seconds": 1.1106296000000384, + "full_seconds": 1.0444942999999967 + }, + { + "round": 8, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.4868454999999585, + "full_seconds": 2.2528948000000355 + }, + { + "round": 8, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.7248246999999992, + "full_seconds": 1.6229385999999977 + }, + { + "round": 8, + "workload": "file", + "first": "thin", + "thin_seconds": 0.33292979999998806, + "full_seconds": 0.3092179999999871 + }, + { + "round": 9, + "workload": "count", + "first": "full", + "full_seconds": 1.0340177000000494, + "thin_seconds": 1.1110329000000547 + }, + { + "round": 9, + "workload": "recursive", + "first": "full", + "full_seconds": 2.2853955000000497, + "thin_seconds": 2.478628800000024 + }, + { + "round": 9, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.5467869999999948, + "thin_seconds": 1.6215884999999162 + }, + { + "round": 9, + "workload": "file", + "first": "full", + "full_seconds": 0.2936617999999953, + "thin_seconds": 0.29660149999995156 + } + ] +} diff --git a/docs/benchmarks/796-dist-lto/runtime-x86_64-unknown-linux-gnu.json b/docs/benchmarks/796-dist-lto/runtime-x86_64-unknown-linux-gnu.json new file mode 100644 index 0000000000..7ef24f037b --- /dev/null +++ b/docs/benchmarks/796-dist-lto/runtime-x86_64-unknown-linux-gnu.json @@ -0,0 +1,318 @@ +{ + "platform": "Linux-6.8.0-1070-azure-x86_64-with-glibc2.35", + "machine": "x86_64", + "thin_bytes": 1501232, + "full_bytes": 1262584, + "summary": { + "count": { + "thin_median_seconds": 0.8315249254999912, + "full_median_seconds": 0.724923090499999, + "median_delta": -0.12660117571656315, + "full_faster_rounds": 10, + "rounds": 10 + }, + "recursive": { + "thin_median_seconds": 2.014292255999976, + "full_median_seconds": 1.8204210360000275, + "median_delta": -0.09440946007050688, + "full_faster_rounds": 10, + "rounds": 10 + }, + "aggregate": { + "thin_median_seconds": 1.4032811930000548, + "full_median_seconds": 1.284071324000024, + "median_delta": -0.08697476907203894, + "full_faster_rounds": 10, + "rounds": 10 + }, + "file": { + "thin_median_seconds": 0.10844071050001958, + "full_median_seconds": 0.09941608150001002, + "median_delta": -0.08957132137967894, + "full_faster_rounds": 10, + "rounds": 10 + } + }, + "rows": [ + { + "round": 0, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8412156200000709, + "full_seconds": 0.7104277810000212 + }, + { + "round": 0, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.0018151280000893, + "full_seconds": 1.8112610330000507 + }, + { + "round": 0, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.3494102280000106, + "full_seconds": 1.172110464999946 + }, + { + "round": 0, + "workload": "file", + "first": "thin", + "thin_seconds": 0.10382301699996788, + "full_seconds": 0.094546562000005 + }, + { + "round": 1, + "workload": "count", + "first": "full", + "full_seconds": 0.7243971469999906, + "thin_seconds": 0.8263870020000468 + }, + { + "round": 1, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8130676420000782, + "thin_seconds": 1.9982209670000657 + }, + { + "round": 1, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.2399840009999252, + "thin_seconds": 1.3593681410000045 + }, + { + "round": 1, + "workload": "file", + "first": "full", + "full_seconds": 0.09685282899999947, + "thin_seconds": 0.10322865000000547 + }, + { + "round": 2, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8253024579998964, + "full_seconds": 0.7109949899999037 + }, + { + "round": 2, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.010346659999982, + "full_seconds": 1.8023026109999591 + }, + { + "round": 2, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.369454688000019, + "full_seconds": 1.1780118020000145 + }, + { + "round": 2, + "workload": "file", + "first": "thin", + "thin_seconds": 0.10529836599994269, + "full_seconds": 0.09584321399995588 + }, + { + "round": 3, + "workload": "count", + "first": "full", + "full_seconds": 0.7321548559999655, + "thin_seconds": 0.8123676929999419 + }, + { + "round": 3, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8180060729999923, + "thin_seconds": 2.0086803629999395 + }, + { + "round": 3, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.2909199040000203, + "thin_seconds": 1.4257145100000344 + }, + { + "round": 3, + "workload": "file", + "first": "full", + "full_seconds": 0.10740702900000088, + "thin_seconds": 0.11841418600010911 + }, + { + "round": 4, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8701234410000325, + "full_seconds": 0.7305525130000206 + }, + { + "round": 4, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.025831617999984, + "full_seconds": 1.835618654999962 + }, + { + "round": 4, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.429696224000054, + "full_seconds": 1.3266209530000879 + }, + { + "round": 4, + "workload": "file", + "first": "thin", + "thin_seconds": 0.12222959700000047, + "full_seconds": 0.11196250599994073 + }, + { + "round": 5, + "workload": "count", + "first": "full", + "full_seconds": 0.746755085000018, + "thin_seconds": 0.8453107919999638 + }, + { + "round": 5, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8681397530000368, + "thin_seconds": 2.0147859879999714 + }, + { + "round": 5, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.3022166780000362, + "thin_seconds": 1.4249415960000533 + }, + { + "round": 5, + "workload": "file", + "first": "full", + "full_seconds": 0.10173107499997514, + "thin_seconds": 0.10898093000002973 + }, + { + "round": 6, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8366628489999357, + "full_seconds": 0.719383181000012 + }, + { + "round": 6, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.0311383329999444, + "full_seconds": 1.8436338599999544 + }, + { + "round": 6, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.456344391000016, + "full_seconds": 1.2928286220000018 + }, + { + "round": 6, + "workload": "file", + "first": "thin", + "thin_seconds": 0.10873541600005865, + "full_seconds": 0.09891602900006546 + }, + { + "round": 7, + "workload": "count", + "first": "full", + "full_seconds": 0.7254490340000075, + "thin_seconds": 0.8216800889999831 + }, + { + "round": 7, + "workload": "recursive", + "first": "full", + "full_seconds": 1.8228359990000627, + "thin_seconds": 2.0322118010000167 + }, + { + "round": 7, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.2772227440000279, + "thin_seconds": 1.3816207900000563 + }, + { + "round": 7, + "workload": "file", + "first": "full", + "full_seconds": 0.10044679600002837, + "thin_seconds": 0.10480432700001074 + }, + { + "round": 8, + "workload": "count", + "first": "thin", + "thin_seconds": 0.8178853530000652, + "full_seconds": 0.7117354690000184 + }, + { + "round": 8, + "workload": "recursive", + "first": "thin", + "thin_seconds": 2.0186340720000544, + "full_seconds": 1.8387265020000996 + }, + { + "round": 8, + "workload": "aggregate", + "first": "thin", + "thin_seconds": 1.4309928249999757, + "full_seconds": 1.3093053609999288 + }, + { + "round": 8, + "workload": "file", + "first": "thin", + "thin_seconds": 0.1099847719999616, + "full_seconds": 0.09991613399995458 + }, + { + "round": 9, + "workload": "count", + "first": "full", + "full_seconds": 0.744425375999981, + "thin_seconds": 0.8378760879999163 + }, + { + "round": 9, + "workload": "recursive", + "first": "full", + "full_seconds": 1.81328857099993, + "thin_seconds": 2.0137985239999807 + }, + { + "round": 9, + "workload": "aggregate", + "first": "full", + "full_seconds": 1.271145133999994, + "thin_seconds": 1.3765272969999387 + }, + { + "round": 9, + "workload": "file", + "first": "full", + "full_seconds": 0.09756429499998376, + "thin_seconds": 0.1081460049999805 + } + ] +} diff --git a/docs/benchmarks/796-dist-lto.py b/docs/benchmarks/796-dist-lto/runtime.py similarity index 98% rename from docs/benchmarks/796-dist-lto.py rename to docs/benchmarks/796-dist-lto/runtime.py index abab9f96d6..3fe55c8e7e 100644 --- a/docs/benchmarks/796-dist-lto.py +++ b/docs/benchmarks/796-dist-lto/runtime.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 """Compare a thin-LTO and a full-LTO `dist` CLI on fixed REPL workloads (#796). -Usage: 796-dist-lto.py THIN_EXE FULL_EXE OUTPUT_JSON [ROUNDS] +Usage: runtime.py THIN_EXE FULL_EXE OUTPUT_JSON [ROUNDS] Each round runs every workload once per binary, alternating which goes first. Both binaries must print the same output (transaction timestamps aside). From 7163d69c21810bfa9065686d9b29286574c0fa19 Mon Sep 17 00:00:00 2001 From: Aditya Mukhopadhyay Date: Fri, 30 Oct 2026 12:06:07 +0530 Subject: [PATCH 3/3] docs: Windows static-CRT evidence and measured revision for #796 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01H2a7Qo5yfvBEjzSuUoB2n9 --- docs/benchmarks/796-dist-lto.md | 11 +++++++---- .../package-x86_64-pc-windows-msvc-static-crt.json | 10 ++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 docs/benchmarks/796-dist-lto/package-x86_64-pc-windows-msvc-static-crt.json diff --git a/docs/benchmarks/796-dist-lto.md b/docs/benchmarks/796-dist-lto.md index 955eb05b72..d45feed062 100644 --- a/docs/benchmarks/796-dist-lto.md +++ b/docs/benchmarks/796-dist-lto.md @@ -7,8 +7,10 @@ now keeps release's full LTO, and the gate builds `--profile dist`. ## Method -Revision: `perf/796-dist-lto` at its first commit (v3 `2ff91059e` plus the profile -change), rustc 1.99.1 everywhere. Thin LTO is the same profile with +Revision: v3 `2ff91059e` (before #794) plus this change's profile edit, as +temporary commits `36598e361` (matrix and bench) and `ac7e661c2` (Windows +static-CRT check) that also added the measuring workflow; rustc 1.99.1 +everywhere. Thin LTO is the same profile with `CARGO_PROFILE_DIST_LTO=thin`. - **CI matrix**: the five cargo-dist targets on the runners `dist plan` assigns @@ -50,7 +52,8 @@ links the C runtime statically (`+crt-static`), which the plain builds above do not: a second run (41014187879) built thin and full LTO with `RUSTFLAGS=-Ctarget-feature=+crt-static` and the `--target` cargo-dist uses. The full build matches the packaged 1,060,864 bytes, differing only in the PE -header; thin is 1,139,712. Without the static CRT the Windows binaries are +header; thin is 1,139,712 +([`package-x86_64-pc-windows-msvc-static-crt.json`](796-dist-lto/package-x86_64-pc-windows-msvc-static-crt.json)). Without the static CRT the Windows binaries are 1,041,920 (thin) and 963,072 (full). All five packaged binaries ran the demo. The gate checks x86_64 Linux only. The other targets' sizes are recorded here, @@ -70,7 +73,7 @@ Clean builds, seconds, in run order (thin, full, full, thin): | bench, x86_64 Linux | 28 | 31 | 31 | 28 | The first build on each runner is slower whatever its profile (cold caches). -Comparing the warmer pairs, full LTO costs 0–10 seconds (0–15%) per build, +Comparing the warmer pairs, full LTO costs 0–10 seconds (0–16%) per build, 3 seconds on the bench machine. A release builds each target once. ## Runtime diff --git a/docs/benchmarks/796-dist-lto/package-x86_64-pc-windows-msvc-static-crt.json b/docs/benchmarks/796-dist-lto/package-x86_64-pc-windows-msvc-static-crt.json new file mode 100644 index 0000000000..de51f453f0 --- /dev/null +++ b/docs/benchmarks/796-dist-lto/package-x86_64-pc-windows-msvc-static-crt.json @@ -0,0 +1,10 @@ +{ + "target": "x86_64-pc-windows-msvc", + "run": 41014187879, + "rustflags": "-Ctarget-feature=+crt-static", + "dist_packaged_bytes": 1060864, + "full_bytes": 1060864, + "thin_bytes": 1139712, + "packaged_equals_full": false, + "note": "dist build --target x86_64-pc-windows-msvc, then thin and full LTO with the same --target and RUSTFLAGS in separate target dirs (ls -l in the run log); cmp of the packaged and full binaries differs from byte 265, in the PE header" +}