Home /Modules/pi-generator/PI-IPC-20K-BENCHMARK.md

PI-IPC-20K-BENCHMARK.md

pi-generator/PI-IPC-20K-BENCHMARK.md · 87 line(s) · markdown

Native IPC Pi 20,000-digit verification record

Record date: 2026-11-09 Repository: mearvk/SLeeLa Worker implementation: 25dfdb2

Purpose and scope

This record captures the 20,000-fractional-digit correctness fixture for the Python Native IPC reference worker. It is intentionally not presented as a performance benchmark for SLeeLa's VM, sleelactl, or native big-integer kernel.

The reference worker's pi.compute method uses Python arbitrary-precision integers and Chudnovsky binary splitting. It receives a scalar integer digit count and returns the formatted decimal expansion through the Native IPC v1 request/response channel.

Reproduction command

From the repository root, with Python 3.12 or a compatible Python 3 runtime:

python -m unittest discover -s tools/tests -p "test_sleela_ipc_worker.py" -v

The focused test is IPCWorkerTests.test_twenty_thousand_pi_digits_match_reference_hash. The Native Drive GitHub Actions workflow configures this test on ubuntu-latest, macos-latest, and windows-latest using Python 3.12.

Recorded correctness assertions

AssertionExpected value
Requested fractional digits20,000
Returned string length20,002 characters, including 3.
Prefix3.14159265358979323846264338327950288419716939937510
SHA-256 of complete returned string977f8d4251b4f633100b4d2dbc214b874c45353b0e3debe41046753777fd6efc

The test checks all three assertions. The digest is a pinned expected value in the test source; the test itself does not document the provenance of the independent reference file. That provenance should be recorded before treating the digest as a fully audited independent-reference comparison.

What this establishes

What this does not establish

Performance measurements still required

For a real performance report, record each run's:

  1. Exact commit SHA and Actions run URL.
  2. OS image, architecture, Python/runtime versions, CPU model, and memory.
  3. Exact command and digit count.
  4. Cold-start and warm-request wall time, separating process startup from compute time.
  5. CPU time and peak resident memory.
  6. Output length, SHA-256, and independent-reference comparison result.
  7. Repeated-run count, median, spread, and any failed or timed-out runs.

The performance comparison must use the intended SLeeLa sleelactl/VM math-module integration as well as the reference worker, with the same 20,000-digit correctness target. Do not derive a runtime speed-up from the Python reference worker's result.