Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Version Benchmark

This project measures how the same program performs across Go 1.19 through Go 1.26. It is the Go companion to RepoFlow's Java benchmark.

Each version is compiled and tested in its official Docker image. Runs use isolated process repeats and produce raw JSON, a Markdown report, and an interactive HTML dashboard.

Workloads

The main appsim workload models a small service request with JSON parsing, SHA256, a concurrent cache, Base64 encoding, and controlled allocation pressure.

The focused workloads cover:

  • JSON parsing and encoding
  • SHA256
  • Base64
  • Regular expressions
  • Integer sorting
  • Concurrent map churn
  • Deflate compression

The benchmark uses only the Go standard library.

Requirements

You need Docker and Python 3.9 or newer. Go does not need to be installed on the host.

Smoke test

Run this first:

bash scripts/smoke_test_docker.sh

It compiles the benchmark, runs the tests, executes every workload, and verifies the generated report. Smoke test numbers are not suitable for publication.

Full benchmark

List the Docker images:

bash scripts/bench_docker.sh --list-images

Run the complete matrix:

bash scripts/bench_docker.sh --pull

The default run tests eight Go release lines, three GOMEMLIMIT settings, nine workloads, and five fresh process repeats. It takes roughly one day on the reference machine.

Run it on an idle machine connected to power. Keep the Docker platform, processor allocation, and power mode unchanged for the full run.

For a host with more than 10 cores:

bash scripts/bench_docker.sh --docker-arg '--cpus=10'

Run only the synthetic application:

bash scripts/bench_docker.sh \
  --scenario appsim \
  --memlimits 2GiB \
  --warmup 20s \
  --measure 10m \
  --forks 5

Use bash scripts/bench_docker.sh --help for every option.

Results

Each run creates a timestamped folder under results containing:

  • dashboard.html with interactive charts
  • report.md with summary tables
  • summary.json with aggregated data
  • Raw result.json, process samples, environment details, and stderr for every repeat

Summary values are means across process repeats. Time series points are medians across the same repeats.

GOMEMLIMIT is a soft Go runtime memory limit. It is not a fixed heap size and is not equivalent to Java Xms or Xmx.

About

A reproducible Docker benchmark comparing application and microbenchmark performance across Go 1.19 through Go 1.26.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages