Benchmarks

How fast RocketSim and the training environment run.

6 min read

How fast RocketSim (0.2.11) and our batched training environment run on the development machine.

In short: one 1v1 arena runs about 1.3 M ticks/s on one thread. The batched environment delivers about 1.9 M (1 car), 2.2 M (1v1) and 2.6 M (2v2) agent steps/s on 28 threads with the full reward, scaling about 10× from 1 to 28 threads. That's well ahead of the learner, which is the bottleneck (Making training fast).

Measured with physlab bench (crates/cli/src/bench_cmd.rs, workloads in crates/rlenv/src/bench.rs):

text
just bench                 # cargo --release
just bench-lto             # [profile.release-lto]: fat LTO, codegen-units = 1
just bench --threads 1,28 --seconds 5 --envs-per-thread 64 --task tasks/ground-touch-v1.json

Results are printed and written to reports/bench.json (--json-out) with machine info, rocketsim version, build profile and a free-form --label.

Machine#

Intel Core i7-14700K (Windows reports Intel64 Family 6 Model 183 Stepping 1): 8 P-cores with Hyper-Threading + 12 E-cores = 28 logical CPUs, Windows 11, Rust 1.98.0, measured 2026-10-15. 3 s per configuration. Other work on the machine was light but not zero, and Windows' placement of threads on P- vs E-cores makes mid-range thread counts (4–14) noisy by up to ±20 % between runs; 1 and 28 threads were stable to a few percent.

1. Raw arena, single thread#

One Soccar arena on one thread, Octanes with random controls re-drawn every 8 ticks (throttle biased forward, jump 10 %, boost 30 %, handbrake 5 %), reset to a random kickoff on a goal or every 1200 ticks. Ticks per second:

LayoutHeavy (release)Balanced (release)Heavy (release-lto)Balanced (release-lto)
ball only5.03 M5.03 M5.44 M5.49 M
1v02.03 M1.99 M2.29 M2.27 M
1v11.31 M1.30 M1.44 M1.46 M
3v30.540 M0.537 M0.597 M0.600 M
  • With a single arena per thread the memory mode makes no difference (the arena fits in cache either way). With many arenas per thread, as in the batched env, Balanced was about 2× faster than Heavy in the research benchmark (28 threads × 64 1v1 arenas: 6.99 M vs 12.29 M ticks/s), because a Heavy arena is ~915 KiB and thrashes the cache. BatchEnv therefore uses Balanced; results are bit-identical to Heavy (the episode-export replay test compares against the Heavy scenario runner).

  • release-lto is ~8–12 % faster across the board.

2. Batched RL environment#

BatchEnv on tasks/ground-touch-v1.json (1 Blue Octane per arena, tick_skip 8, 86-float observation, 7 reward components incl. one KRC potential), 64 envs per thread, uniformly random actions from the 90-action table, auto-reset on. Includes event scanning, observation and reward building and resets — what a trainer gets before any Python or learner cost. Median of three runs:

ThreadsEnvsAgent steps/s (release)Ticks/s (release)Agent steps/s (release-lto)Ticks/s (release-lto)
164184 k1.47 M204 k1.64 M
4256473 k3.78 M630 k5.04 M
8512849 k6.79 M906 k7.25 M
148961.21 M9.68 M1.31 M10.5 M
2817921.86 M14.9 M2.00 M16.0 M

Ticks/s = agent steps × tick_skip (an upper bound: episodes ending mid-step simulate fewer ticks). Building 1792 Balanced arenas takes ~0.04 s.

Observations:

  • Env overhead at one thread: 5.4 µs per agent step versus 8 × 0.49 µs = 3.9 µs of raw 1v0 physics, i.e. ~1.5 µs per step (~27 %) for event scanning, boost tracking, utilities/KRC, the 86-float observation, resets and the random action draw.

  • Scaling: ~10× from 1 to 28 threads. Past 8 threads the extra workers run on E-cores and hyperthreads (same flattening as the raw research benchmark: 1v1 arenas reached 14.1 M ticks/s on 28 threads).

  • At ~2 M agent steps/s, 100 k steps take about 50 ms to simulate, so the learner dominates.

3. Match tasks (multi-agent)#

BatchEnv on tasks/match-1v1-v1.json (2 cars, 119-float observations) and tasks/match-2v2-v1.json (4 cars, 181 floats), demolitions on, 9 reward components (the placeholder reward of the time) incl. one shot prediction per touch, 64 envs per thread, uniformly random actions for every car, auto-reset on (episodes average ≈ 430 steps, so random play mostly runs into the 30 s = 450-step no-touch timeout). An env step advances one arena by 8 ticks and yields one agent step per car. ground-touch-v1 was re-measured in the same runs for reference. Median of three runs, 2026-10-15; the machine was shared with other workloads, and one run in each series dropped 2–3× (discarded by the median).

text
just bench-match --seconds 3
# = physlab bench --skip-raw --threads 1,28 --seconds 3
#     --task tasks/ground-touch-v1.json,tasks/match-1v1-v1.json,tasks/match-2v2-v1.json
TaskThreadsEnvsAgent steps/s (release)Env steps/sTicks/sAgent steps/s (release-lto)Env steps/sTicks/s
ground-touch-v1 (1 car)164187 k187 k1.50 M206 k206 k1.65 M
2817921.84 M1.84 M14.7 M1.86 M1.86 M14.9 M
match-1v1-v1 (2 cars)164211 k105 k0.84 M233 k117 k0.93 M
2817922.29 M1.15 M9.17 M2.29 M1.15 M9.18 M
match-2v2-v1 (4 cars)164243 k60.7 k0.49 M265 k66.1 k0.53 M
2817922.61 M652 k5.21 M2.76 M689 k5.51 M
  • Per arena tick, 1v1 costs about 1.8× a 1-car arena and 2v2 about 3.1× (single thread), close to the raw-arena ratios of section 1 (1v1 is 1.53× 1v0 there); the rest is per-agent observation, reward and event work (e.g. 1v1 single thread: 9.5 µs per env step vs 6.2 µs of raw 1v1 physics for 8 ticks).

  • With the full Lucy-SKG reward (the tasks' current reward: 23 components, 5 potentials, 2 KRCs, team spirit; re-measured 2026-10-15, release, median of 3, same command): ground-touch-v1 188 k / 1.93 M, match-1v1-v1 211 k / 2.20 M, match-2v2-v1 238 k / 2.57 M agent steps/s at 1 / 28 threads, i.e. within ~2 % (1 thread) and ~4 % (28 threads, noisier, shared machine) of the placeholder-reward numbers in the table: per-agent reward work stays small next to physics.

  • Agent steps/s, the number a self-play learner consumes, grow with the team size: one physics step feeds every car. At 28 threads a 2v2 batch delivers ≈ 2.6–2.8 M agent steps/s.

  • Scaling 1 → 28 threads: ≈ 10–11× as for single-agent tasks.

Reproducing#

Numbers above came from physlab bench --label release (target/release) and physlab bench --label release-lto (target/release-lto), plus two --skip-raw repeats of each for the batched table. --task takes a comma-separated list (one table per task); the JSON lists every task's rows with n_agents, agent_steps_per_s, env_steps_per_s and ticks_per_s. The JSON files land in reports/ (gitignored).