language-bench

Startup › Go

Startup Go 1.27

go build. End-to-end time 1.3 ms on the average machine, index 2.23× vs the fastest (2.15×–2.30×), 2.5 MB average memory.

How this number came about

  1. The task. The program prints `ok` and exits. This measures process start-up, runtime initialisation and (for managed runtimes) module loading - the fixed cost paid by every other benchmark. The program is started as /work/bin/go-1.27-go-default-startup. Its output must equal expected.txt exactly; this was the case in every session.
  2. The environment. A fresh GitHub-hosted VM per session runs the pinned Docker image golang@sha256:9048d5e7751706200eb1719c7dae0436950d362f29a1da91fa05e5c63867c60f containing go version go1.27.3 linux/amd64. Hardware, kernel and glibc of every session are listed below.
  3. The source. Exactly this code (hash 4ccfaf3e7e3391dd, in git at the commit of each session) is the kernel: it only decodes the instance and solves it. It is built together with the language's one harness, which owns the clock, the loop and the output:
// start-up: the harness runs one empty iteration; only the end-to-end run is measured for this problem
package main

func Setup(args []string)              {}
func Decode(data []byte) any           { return nil }
func Solve(inst any) any               { return nil }
func Emit(res any, sink func(int64))   { sink(1) }
  1. Build and run.
    build
    mkdir -p /work/bin/go-1.27-go-default-startup.d && cp /repo/languages/go/harness/harness.go /work/bin/go-1.27-go-default-startup.d/harness.go && cp /repo/languages/go/impl/startup/main.go /work/bin/go-1.27-go-default-startup.d/problem.go && go build -o /work/bin/go-1.27-go-default-startup /work/bin/go-1.27-go-default-startup.d/harness.go /work/bin/go-1.27-go-default-startup.d/problem.go
    run
    /work/bin/go-1.27-go-default-startup
    end-to-end
    hyperfine runs the same binary for exactly one iteration (process start to exit, with the instance read from a file) and records wall-clock time and peak resident memory.
    binary size
    3.0 MB
  2. Many sessions, many iterations. The benchmark was measured in 4 independent sessions between 2026-10-27 and 2026-10-27, on 2 CPU models. Within a session the execution order of all benchmarks was randomised. Each dot below is one repetition; the black bar is the session median; orange dots are flagged outliers (kept in the data).
1.0 ms1.2 ms1.3 ms1.5 ms1.6 ms2026-10-27 · AMD EPYC 9V74 80-Core10 reps · median 1.2 ms2026-10-27 · AMD EPYC 9V74 80-Core10 reps · median 1.4 ms2026-10-27 · AMD EPYC 7763 64-Core10 reps · median 1.4 ms2026-10-27 · AMD EPYC 9V74 80-Core10 reps · median 1.2 ms
SessionCPURepsMedianMADMachine factorMedian ÷ factorAvg. / peak memorySource
2026-10-27AMD EPYC 9V74 80-Core Processor (4 cores)101.2 ms50 µs0.890×1.4 ms2.4 MBActions run · raw data · commit
2026-10-27AMD EPYC 9V74 80-Core Processor (4 cores)101.4 ms28 µs1.079×1.3 ms2.5 MBActions run · raw data · commit
2026-10-27AMD EPYC 7763 64-Core Processor (4 cores)101.4 ms68 µs1.068×1.3 ms2.5 MBActions run · raw data · commit
2026-10-27AMD EPYC 9V74 80-Core Processor (4 cores)101.2 ms45 µs0.880×1.3 ms2.5 MBActions run · raw data · commit

The table is computed from the raw values: download every iteration and repetition of this benchmark (CSV), or the complete session files linked above. Each “Warm median” is the median of the kernel iterations after the first 2 s; “÷ factor” divides it by the machine factor.

  1. Cancelling out the hardware. GitHub gives every session a different computer, and some are faster than others, so raw times from different sessions cannot be compared directly. To fix that, every session gets a machine factor: how many times longer programs take on that machine than on the average machine. A factor of 1.2 means “20% slower than average”. We find these factors by looking at benchmarks that ran in several sessions: if the same programs are consistently 20% slower in one session, that machine is 1.2× slower. The factors for this benchmark's sessions are 0.890×, 1.079×, 1.068×, 0.880× (click a date in the table above for the session's details). Technically: we fit log(time) = benchmark + machine across all 8 sessions at once; see the methodology.
  2. Combining sessions. Sessions, not iterations, are the independent samples. Each session's median divided by its machine factor (1.4 ms, 1.3 ms, 1.3 ms, 1.3 ms) is averaged geometrically: 1.3 ms on the average machine (end-to-end). The 95% interval 1.3 ms–1.4 ms comes from a cluster bootstrap that resamples sessions, then iterations within each.
  3. Index vs fastest. 2.23× = this time ÷ the time of the fastest entry on the same problem, c 14 gcc-O3-native (593 µs); interval 2.15×–2.30×.
  4. How much was hardware? Raw session medians differ by a geometric factor of 1.100; after dividing out the machine factors they differ by 1.019. The overall model leaves 1.057× of unexplained noise.
  5. Memory. Hyperfine records the peak resident set size of every repetition. We report the average over the repetitions of a session, then over sessions: 2.5 MB.

Reproduce it

git clone https://github.com/StijnRis/language-bench.git && cd language-bench
pnpm install
pnpm lb verify go --version 1.27 --variant go-default --problems startup

Needs Docker. The command builds the harness and the program in the pinned image and checks the result against the generator's reference; the full timed measurement runs in CI sessions. The parameters of the problem are none.