# guy5116/speed-test architecture

> Architecture diagram of the GitHub repository guy5116/speed-test, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/guy5116/speed-test
- Repository: https://github.com/guy5116/speed-test

## Overview

Speed-Test is a command-line benchmark suite comparing implementations of six workloads across fifteen languages, plus NumPy for three vectorizable workloads. The principal workflow is to choose a scale and run count, execute the available implementations on matching inputs, validate checksums, and present per-language timings, ratios, summaries, and human-scale projections. The README documents the workload and comparison stages; sampled source confirms NumPy’s vectorized kernels and run.py’s timing cache and result handling. The excerpts do not expose all runner dispatch details, so some documented links use the README as evidence.

Main entry points: [`run.py`](https://github.com/guy5116/speed-test/blob/main/run.py) (Run coordinator), [`bench.c`](https://github.com/guy5116/speed-test/blob/main/bench.c) (Language implementations), [`bench_numpy.py`](https://github.com/guy5116/speed-test/blob/main/bench_numpy.py) (NumPy kernels)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_execution["Benchmark execution"]
  node_runner["Run coordinator<br/>[run.py]"]
  node_language_kernels["Language implementations<br/>[bench.c]"]
  node_numpy_kernels["NumPy kernels<br/>[bench_numpy.py]"]
end

subgraph group_kernels["Workload kernels"]
  node_mandelbrot["Mandelbrot<br/>[bench.c]"]
  node_sieve["Sieve<br/>[bench.c]"]
  node_quicksort["Quicksort<br/>[bench.c]"]
  node_wordcount["Word count<br/>[bench.c]"]
  node_binarytrees["Binary trees<br/>[bench.c]"]
  node_matmul["Matrix multiply<br/>[bench.c]"]
end

subgraph group_comparison["Comparison and results"]
  node_checksum["Checksum validation<br/>[run.py]"]
  node_comparison_results["Timing comparison<br/>[run.py]"]
  node_report["Results report<br/>[run.py]"]
end

subgraph group_support["Timing support"]
  node_estimate["Progress estimates<br/>[run.py]"]
  node_timing_cache[("Timing cache<br/>[run.py]")]
end

node_user(("CLI user"))

node_user -->|"sets options"| node_runner
node_runner -->|"runs implementations"| node_language_kernels
node_runner -->|"runs eligible kernels"| node_numpy_kernels
node_language_kernels -->|"implements"| node_mandelbrot
node_language_kernels -->|"implements"| node_sieve
node_language_kernels -->|"implements"| node_quicksort
node_language_kernels -->|"implements"| node_wordcount
node_language_kernels -->|"implements"| node_binarytrees
node_language_kernels -->|"implements"| node_matmul
node_numpy_kernels -->|"vectorizes"| node_mandelbrot
node_numpy_kernels -->|"vectorizes"| node_sieve
node_numpy_kernels -->|"vectorizes"| node_matmul
node_runner -->|"validates checksums"| node_checksum
node_runner -->|"collects timings"| node_comparison_results
node_comparison_results -->|"renders results"| node_report
node_runner -->|"estimates remaining time"| node_estimate
node_runner -->|"loads and saves"| node_timing_cache

click node_runner "https://github.com/guy5116/speed-test/blob/main/run.py"
click node_language_kernels "https://github.com/guy5116/speed-test/blob/main/bench.c"
click node_numpy_kernels "https://github.com/guy5116/speed-test/blob/main/bench_numpy.py"
click node_mandelbrot "https://github.com/guy5116/speed-test/blob/main/bench.c"
click node_sieve "https://github.com/guy5116/speed-test/blob/main/bench.c"
click node_quicksort "https://github.com/guy5116/speed-test/blob/main/bench.c"
click node_wordcount "https://github.com/guy5116/speed-test/blob/main/bench.c"
click node_binarytrees "https://github.com/guy5116/speed-test/blob/main/bench.c"
click node_matmul "https://github.com/guy5116/speed-test/blob/main/bench.c"
click node_checksum "https://github.com/guy5116/speed-test/blob/main/run.py"
click node_comparison_results "https://github.com/guy5116/speed-test/blob/main/run.py"
click node_report "https://github.com/guy5116/speed-test/blob/main/run.py"
click node_estimate "https://github.com/guy5116/speed-test/blob/main/run.py"
click node_timing_cache "https://github.com/guy5116/speed-test/blob/main/run.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_runner,node_language_kernels,node_numpy_kernels,node_user toneBlue
class node_mandelbrot,node_sieve,node_quicksort,node_wordcount,node_binarytrees,node_matmul toneAmber
class node_checksum,node_comparison_results,node_report toneMint
class node_estimate,node_timing_cache toneRose
```

## Components

### Benchmark execution

- [Run coordinator](https://github.com/guy5116/speed-test/blob/main/run.py): `run.py`
- [Language implementations](https://github.com/guy5116/speed-test/blob/main/bench.c): `bench.c`
- [NumPy kernels](https://github.com/guy5116/speed-test/blob/main/bench_numpy.py): `bench_numpy.py`

### Workload kernels

- [Mandelbrot](https://github.com/guy5116/speed-test/blob/main/bench.c): `bench.c`
- [Sieve](https://github.com/guy5116/speed-test/blob/main/bench.c): `bench.c`
- [Quicksort](https://github.com/guy5116/speed-test/blob/main/bench.c): `bench.c`
- [Word count](https://github.com/guy5116/speed-test/blob/main/bench.c): `bench.c`
- [Binary trees](https://github.com/guy5116/speed-test/blob/main/bench.c): `bench.c`
- [Matrix multiply](https://github.com/guy5116/speed-test/blob/main/bench.c): `bench.c`

### Comparison and results

- [Checksum validation](https://github.com/guy5116/speed-test/blob/main/run.py): `run.py`
- [Timing comparison](https://github.com/guy5116/speed-test/blob/main/run.py): `run.py`
- [Results report](https://github.com/guy5116/speed-test/blob/main/run.py): `run.py`

### Timing support

- [Progress estimates](https://github.com/guy5116/speed-test/blob/main/run.py): `run.py`
- [Timing cache](https://github.com/guy5116/speed-test/blob/main/run.py): `run.py`

### Other components

- **CLI user**

## Connections

- CLI user → Run coordinator: sets options (evidence: `README.md`)
- Run coordinator → Language implementations: runs implementations (evidence: `README.md`)
- Run coordinator → NumPy kernels: runs eligible kernels (evidence: `README.md`)
- Language implementations → Mandelbrot: implements (evidence: `README.md`)
- Language implementations → Sieve: implements (evidence: `README.md`)
- Language implementations → Quicksort: implements (evidence: `README.md`)
- Language implementations → Word count: implements (evidence: `README.md`)
- Language implementations → Binary trees: implements (evidence: `README.md`)
- Language implementations → Matrix multiply: implements (evidence: `README.md`)
- NumPy kernels → Mandelbrot: vectorizes (evidence: `bench_numpy.py`)
- NumPy kernels → Sieve: vectorizes (evidence: `bench_numpy.py`)
- NumPy kernels → Matrix multiply: vectorizes (evidence: `bench_numpy.py`)
- Run coordinator → Checksum validation: validates checksums (evidence: `README.md`)
- Run coordinator → Timing comparison: collects timings (evidence: `README.md`)
- Timing comparison → Results report: renders results (evidence: `README.md`)
- Run coordinator → Progress estimates: estimates remaining time (evidence: `README.md`)
- Run coordinator → Timing cache: loads and saves (evidence: `run.py`)
