Skip to content

Commit 75d05a2

Browse files
committed
bench: add 1000x params and big-bench job; include Crystal reliably; auto-install deps in CI; add plot+report; README benchmark table and heavy-run docs; ignore GIGAPLAN.md
1 parent 1f45c62 commit 75d05a2

File tree

8 files changed

+186
-288
lines changed

8 files changed

+186
-288
lines changed

.github/workflows/bench.yml

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ jobs:
1616
run: |
1717
cargo build -p bmssp
1818
cargo test -p bmssp --all-features -- --nocapture
19-
- name: Install minimal deps
19+
- name: Install deps (all languages)
2020
run: |
21-
sudo apt-get update
22-
sudo apt-get install -y build-essential default-jdk elixir erlang
21+
bash scripts/install_deps.sh --yes || true
2322
python3 -m pip install --user -r bench/requirements.txt || true
2423
- name: Quick smoke
2524
run: |
@@ -39,30 +38,9 @@ jobs:
3938
- name: Cargo test (unit)
4039
run: |
4140
cargo test -p bmssp --verbose
42-
- name: Install Crystal
41+
- name: Install all deps (Linux)
4342
run: |
44-
sudo apt-get update
45-
sudo apt-get install -y curl gnupg build-essential
46-
curl -fsSL https://dist.crystal-lang.org/apt/setup.sh | sudo bash
47-
sudo apt-get install -y crystal shards
48-
- name: Install JDK/Kotlin, Elixir, Erlang (with SDKMAN fallback)
49-
run: |
50-
set -euxo pipefail
51-
sudo apt-get update
52-
sudo apt-get install -y default-jdk elixir erlang || true
53-
if ! command -v java >/dev/null; then sudo apt-get install -y default-jdk || true; fi
54-
if ! command -v kotlinc >/dev/null; then
55-
# SDKMAN fallback for Kotlin
56-
curl -s "https://get.sdkman.io" | bash
57-
source "$HOME/.sdkman/bin/sdkman-init.sh"
58-
sdk install java 21.0.3-tem || true
59-
sdk install kotlin 2.0.20 || true
60-
kotlinc -version || true
61-
fi
62-
- name: Install Nim
63-
uses: iffy/install-nim@v5
64-
with:
65-
version: stable
43+
bash scripts/install_deps.sh --yes
6644
- name: Cache cargo
6745
uses: actions/cache@v4
6846
with:
@@ -80,3 +58,39 @@ jobs:
8058
with:
8159
name: results
8260
path: results
61+
62+
big-bench-1000x:
63+
# manual trigger only to avoid heavy CI on every push
64+
if: ${{ github.event_name == 'workflow_dispatch' }}
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
- uses: dtolnay/rust-toolchain@stable
69+
- name: Install all deps
70+
run: |
71+
bash scripts/install_deps.sh --yes
72+
python3 -m pip install --user -r bench/requirements.txt || true
73+
- name: Cache cargo
74+
uses: actions/cache@v4
75+
with:
76+
path: |
77+
~/.cargo/registry
78+
~/.cargo/git
79+
target
80+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
81+
- name: Run 1000x bench
82+
run: |
83+
python3 bench/runner.py --params bench/params_1000x.yaml --release --jobs 4 --timeout-seconds 1800 --out results-1000x
84+
- name: Generate plots
85+
run: |
86+
python3 bench/plots.py results-1000x/agg-*\.csv --out results-1000x || true
87+
- name: Build report
88+
run: |
89+
CSV=$(ls -1 results-1000x/agg-*.csv | tail -n1)
90+
META=$(ls -1 results-1000x/meta-*.yaml | tail -n1 || true)
91+
python3 bench/make_report.py --csv "$CSV" ${META:+--meta "$META"} --out results-1000x
92+
- name: Upload 1000x artifacts
93+
uses: actions/upload-artifact@v4
94+
with:
95+
name: results-1000x
96+
path: results-1000x

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ impls/erlang/*.beam
2626
# OS cruft
2727
.DS_Store
2828
Thumbs.db
29+
30+
# repo-local docs (not for git)
31+
GIGAPLAN.md

GIGAPLAN.md

Lines changed: 0 additions & 253 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ Implementation of the algorithm in multiple languages to compare performance in
44

55
Languages currently wired in this repo: Rust, C, C++, Nim, Crystal, Kotlin (JAR), Elixir (.exs), Erlang (.erl).
66

7+
## Benchmark snapshot
8+
9+
| impl | lang | graph | n | m | k | B | seed | threads | time_ns | popped | edges_scanned | heap_pushes | B_prime | mem_bytes |
10+
|---------------|--------|-------|------|------|---|----|------|---------|---------|--------|---------------|-------------|---------|-----------|
11+
| rust-bmssp | Rust | grid | 2500 | 9800 | 4 | 50 | 1 | 1 | 741251 | 868 | 3423 | 1047 | 50 | 241824 |
12+
| c-bmssp | C | grid | 2500 | 9800 | 4 | 50 | 1 | 1 | 99065 | 1289 | 5119 | 1565 | 50 | 176800 |
13+
| cpp-bmssp | C++ | grid | 2500 | 9800 | 4 | 50 | 1 | 1 | 117480 | 1064 | 4224 | 1261 | 50 | 176800 |
14+
| kotlin-bmssp | Kotlin | grid | 2500 | 9800 | 4 | 50 | 1 | 1 | 5308820 | 1102 | 4386 | 1309 | 50 | 196800 |
15+
| elixir-bmssp | Elixir | grid | 2500 | 9800 | 4 | 50 | 1 | 1 | 5410039 | 870 | 3447 | 1047 | 50 | 196800 |
16+
| erlang-bmssp | Erlang | grid | 2500 | 9800 | 4 | 50 | 1 | 1 | 1155739 | 691 | 2701 | 818 | 50 | 196800 |
17+
718
Rust implementation of **bounded multi-source shortest paths** (multi-source Dijkstra cut off at `B`).
819

920
## Run
@@ -15,6 +26,9 @@ python3 bench/runner.py --release --out results
1526

1627
# fast iteration
1728
python3 bench/runner.py --quick --out results-dev --timeout-seconds 20 --jobs 2
29+
30+
# 1000x larger graphs (heavy):
31+
python3 bench/runner.py --params bench/params_1000x.yaml --release --jobs 4 --timeout-seconds 600 --out results
1832
```
1933

2034
### One-time setup scripts

0 commit comments

Comments
 (0)