Dense neural-network layer
Forward pass of a 256x256 dense (fully-connected) layer with ReLU activation. The inner dot-product loop hits pipit's SIMD recogniser; every other runner runs it scalarly.
Compile time · median (cold)
Full statistics
| Runner | N | Compile | Runtime | P95 | Stddev | RSS | vs pipit | Status |
|---|---|---|---|---|---|---|---|---|
| Native Gocompiled | 7 | 109 ms | 148 µs | 151 µs | 1.05 µs | 1.62 GiB | 109× | OK |
| Pipitbytecode VM | 7 | 995 µs | 831 µs | 851 µs | 15.0 µs | 592 MiB | 1.00× | OK |
| CPython 3.14bytecode VM | 7 | 450 µs | 25.1 ms | 25.6 ms | 254 µs | n/a | 0.45× | OK |
| PyPy 7.3tracing JIT | 7 | 321 µs | 6.21 ms | 6.84 ms | 298 µs | n/a | 0.32× | OK |
| tengobytecode VM | 7 | 238 µs | 22.9 ms | 31.3 ms | 3.92 ms | 1.69 GiB | 0.24× | OK |
| scriggobytecode VM | 7 | 300 µs | 14.1 ms | 23.5 ms | 4.37 ms | 1.69 GiB | 0.30× | OK |
| mvmbytecode VM | 7 | 323 µs | 18.2 ms | 18.4 ms | 199 µs | 1.69 GiB | 0.32× | OK |
| yaegiAST walker | 7 | 430 µs | 16.4 ms | 16.4 ms | 1.79 ms | 1.69 GiB | 0.43× | OK |
Workload & symmetry rules
Workload
For each of 256 output neurons: compute output[i] = relu(sum_j(W[i][j] * input[j]) + bias[i]) over a deterministically-seeded 256x256 weight matrix and 256-element input vector. Sum the activations, multiply by 1000, emit as a single integer so canonical hashing is FP-safe.
Symmetry rules
- Hand-rolled scalar dot-product loop in every runner. No matrix libraries, no numpy, no SIMD intrinsics in the source.
- The Go source is structured so pipit's pattern recogniser sees the inner loop as a dot-product and emits one
subOpSimdDotProductFloat64per row. The same source runs scalarly on every other Go-family interpreter. - Python emits a Python
forloop over scalar floats; nonumpy.dot.
Why this benchmark exists
It is the headline number for pipit's SIMD recogniser. Bench 14 (Mandelbrot) shows pure FP throughput; bench 22 (n-body) shows struct-in-FP-loop; this one specifically shows what the SIMD path is worth in a workload that maps to it perfectly. If the recogniser fires, pipit closes much of the gap to native Go.
Source code
pipit / Go
pipit_source.gonative Go
native_main.goCPython / PyPy
cpython.pytengo
script.tengo