Building, testing, measuring¶
Native¶
make setup # venv, vendored sources at the pinned commit
make build # build/libgammonnet.so
make test # ~1 500 tests
No exotic system dependency: the target is “it compiles with a compiler and nothing else”.
Build variants, and what they change¶
Effect |
|
|---|---|
default ( |
development build; outputs bit-identical to the scalar path |
|
~4× faster, outputs moved by about 6e-7. The campaign build |
|
set unconditionally on |
|
instruments batch fill |
The evaluation fingerprint differs between these builds, and a campaign journal refuses it: that is intended.
WebAssembly¶
make wasm # scalar and SIMD
make wasm-parity # parity BEFORE any speed figure
gn_wasm.c compiles without Emscripten (the include is guarded), so cc -c checks it anywhere;
only linking needs emcc.
The artefact¶
make artifact VERSION=v1
The script refuses to produce an incomplete directory: it replays the non-regression corpus before writing anything, and reports any missing piece.
Writing a benchmark¶
Every benchmark here follows the same shape, and it is not a style:
The protocol at the top of the file, including what the measurement does not say.
Two columns whenever an arbiter is involved, never one.
A confidence interval, bootstrapped over the independent unit.
A pilot before the volume.
An explicit refusal when an input is out of domain.
--workers, and it must be true: a benchmark whose documentation advertised parallelism without implementing it cost 68 minutes where 6 sufficed.