Host
Intel Core Ultra 9 285K · 24 cores
Platform
linux/amd64
Go
go1.27.0
CPython
python:3.14-slim
PyPy
pypy:3.11-slim
Runs / combo
7 + 2 warmup

N-body solar system

50,000 integration steps of the outer solar system (Sun + Jupiter, Saturn, Uranus, Neptune) using the canonical Computer Language Benchmarks Game initial conditions. Hot loop is struct-field access through a slice under FP load.

Runtime · median per inner-loop window

median of 7 runs

Native Gocompiled
8.13 ms0.04×
Pipitbytecode VM
207 msbaseline
CPython 3.14bytecode VM
419 ms2.02×
PyPy 7.3tracing JIT
26.9 ms0.13×
Ttengobytecode VM
1.09 s5.26×
Sscriggobytecode VM
941 ms4.54×
Mmvmbytecode VM
953 ms4.60×
YyaegiAST walker
1.17 s5.63×

Full statistics

RunnerNCompileRuntimeP95StddevRSSvs pipitStatus
Native Gocompiled7110 ms8.13 ms8.27 ms48.7 µs1.62 GiB0.04×OK
Pipitbytecode VM71.83 ms207 ms210 ms1.62 ms592 MiB1.00×OK
CPython 3.14bytecode VM7563 µs419 ms424 ms3.35 msn/a2.02×OK
PyPy 7.3tracing JIT7433 µs26.9 ms28.3 ms648 µsn/a0.13×OK
tengobytecode VM7413 µs1.09 s1.20 s49.1 ms1.69 GiB5.26×OK
scriggobytecode VM7769 µs941 ms991 ms20.0 ms1.69 GiB4.54×OK
mvmbytecode VM7727 µs953 ms964 ms8.56 ms1.69 GiB4.60×OK
yaegiAST walker7691 µs1.17 s1.21 s24.8 ms1.69 GiB5.63×OK
Workload & symmetry rules

Workload

Gravitational simulation of five bodies (Sun, Jupiter, Saturn, Uranus, Neptune) over 50,000 time steps. Each step computes pair-wise gravitational impulses for every (i, j) pair, then integrates positions from velocities. Output is the conserved energy before and after, each multiplied by 1e9 and rounded to integer.

Symmetry rules

  • Bodies are stored as a slice of records with named fields (Body struct on Go, class with __slots__ on Python). The hot loop pays struct-field-access cost on every runner.
  • Tengo has no struct type, so its translation uses parallel arrays (struct-of-arrays) over the seven body fields. Shape of the hot loop is otherwise identical.
  • math.Sqrt / math.sqrt is the only stdlib intrinsic allowed; sqrt is implemented identically (libm) across every runner so its cost does not distort the comparison.

Banned

  • Numpy, scipy, gonum, hand-written assembly, any SIMD shortcut.
  • Threading or process parallelism. This benchmark is single-threaded serial throughput by design (bench 16 covers parallelism).

Why this benchmark exists

The unique signal: struct field access inside an FP hot loop. Bench 14 uses four local scalar floats and no struct. Bench 21 uses 2D float arrays. Neither stresses the struct path. pipit's struct-in-typed-slice path is the open Phase 7 (struct unboxing) area; this benchmark gives a clean before-after measurement of any work on that path.

Source code