Generic numeric pipeline
Generic Sum / Max / Min over 500 slices each of uint32 and int64. Exercises type-parameterised dispatch.
Runtime · median per inner-loop window
Full statistics
| Runner | N | Compile | Runtime | P95 | Stddev | RSS | vs pipit | Status |
|---|---|---|---|---|---|---|---|---|
| Native Gocompiled | 7 | 108 ms | 696 µs | 700 µs | 1.96 µs | 1.62 GiB | 0.04× | OK |
| Pipitbytecode VM | 7 | 1.65 ms | 17.7 ms | 18.0 ms | 127 µs | 592 MiB | 1.00× | OK |
| CPython 3.14bytecode VM | 7 | 370 µs | 32.5 ms | 32.6 ms | 171 µs | n/a | 1.83× | OK |
| PyPy 7.3tracing JIT | 7 | 307 µs | 10.2 ms | 11.1 ms | 584 µs | n/a | 0.58× | OK |
| tengobytecode VM | 7 | 240 µs | 70.9 ms | 86.2 ms | 6.75 ms | 1.69 GiB | 4.00× | OK |
| scriggobytecode VM | 0 | n/a | n/a | n/a | n/a | n/a | n/a | unsupported |
| mvmbytecode VM | 7 | 402 µs | 40.0 ms | 50.2 ms | 3.66 ms | 1.69 GiB | 2.26× | OK |
| yaegiAST walker | 7 | 453 µs | 42.0 ms | 57.8 ms | 6.94 ms | 1.69 GiB | 2.37× | 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 pipit's generics path has competitive specialisation.
Source code
pipit / Go
pipit_source.gonative Go
native_main.goCPython / PyPy
cpython.pytengo
script.tengo