Host
Intel Core Ultra 9 285K · 24 cores
Platform
linux/amd64
Go
go1.26.0
CPython
python:3.13-slim
PyPy
pypy:3.10-slim
Runs / combo
10 + 2 warmup

Generic numeric pipeline

Generic Sum / Max / Min over 500 slices each of uint32 and int64. Exercises type-parameterised dispatch.

Compile time · median (cold)

median of 10 runs

Native Gocompiled
181 ms113×
Piko interpbytecode VM
1.61 msbaseline
CPython 3.13bytecode VM
331 µs0.21×
PyPy 7.3tracing JIT
277 µs0.17×
Ttengobytecode VM
230 µs0.14×
Sscriggobytecode VM
n/a
Mmvmbytecode VM
417 µs0.26×
YyaegiAST walker
425 µs0.26×

Full statistics

RunnerNCompileRuntimeP95StddevRSSvs pikoStatus
Native Gocompiled10181 ms716 µs721 µs2.78 µs68 MiB113×OK
Piko interpbytecode VM101.61 ms26.9 ms27.2 ms187 µs125 MiB1.00×OK
CPython 3.13bytecode VM10331 µs33.7 ms34.9 ms830 µsn/a0.21×OK
PyPy 7.3tracing JIT10277 µs9.56 ms10.1 ms193 µsn/a0.17×OK
tengobytecode VM10230 µs90.9 ms94.1 ms7.31 ms523 MiB0.14×OK
scriggobytecode VM0n/an/an/an/an/an/aunsupported
mvmbytecode VM10417 µs55.5 ms57.2 ms912 µs62 MiB0.26×OK
yaegiAST walker10425 µs42.3 ms60.4 ms7.06 ms62 MiB0.26×OK
Workload & symmetry rules

Workload

Generate 500 slices of 100 uint32 values via LCG; apply GenericSum, GenericMax, GenericMin to each, XOR-folding results. Repeat with 500 slices of 100 int64 values, the same generic functions in a second instantiation. Total 6,000 generic dispatches per outer call, each iterating 100 elements.

Symmetry rules

  • Go uses real [T Numeric] generics; Python uses the equivalent duck-typed function (it has no separate generic-dispatch primitive, so the comparison is what Python's runtime cost looks like on the same workload).

Why this benchmark exists

Distinct from interface dispatch (bench 13) and closure dispatch (bench 17). Measures whether piko's generics path has competitive specialisation.

Source code