Footprint & cost¶
This page reports how big d/Python programs and tools are and how fast they run, as measured so far, and it says plainly what each number does not tell you. After it you will know the size of a typical compiled program, the current timings on a Mac, the limits the runtime enforces, and which budgets have not been set yet.
d/Python's design rules ask for five measurements, each on a named configuration and reported separately: compiler code size, memory used while compiling, application size, memory used while running, and speed and responsiveness. They also say that no budget is set by decision alone, and that a smaller binary is not an improvement if it changes Python behavior, hides a cost in every application, or makes the user interface stall.
Compiled programs¶
| Program | DBC bytes | Libraries | Measured |
|---|---|---|---|
hello.py |
183 | none | this bundle, in Node |
fibonacci.py |
1,561 | dpython.integers (2,791) |
this bundle; inspect on macOS agrees |
console_input.py |
2,799 | dpython.integers |
this bundle |
console_hash.py |
3,909 | dpython.bits, dpython.integers |
this bundle |
tictactoe.py |
21,233 | dpython.integers |
this bundle |
tictactoe.py, native, 2026-09-11 |
17,968 | the first macOS measurement; the frontend has grown since | |
corpus case map |
24,150 | release measurement, 2026-09-12 | |
corpus case pow |
11,775 | release measurement, 2026-09-12 |
These are optimized compiled program files, .dbc. The support libraries, shared library files, .dbl, are listed separately because they are shared: their cost is paid once per machine, not once per application.
Timing, on macOS¶
From the release measurement of 12 September 2026, five fresh processes per action with a warmed filesystem:
| Case | Compile median | Run median |
|---|---|---|
map |
215.3 ms | 193.9 ms |
pow |
193.5 ms | 273.6 ms |
These times include process startup. They are observations, not deadlines, and they say nothing about memory on an 8-bit machine. Nothing else was compiling or probing the reference build while the measurements ran.
The game, on macOS¶
The tic-tac-toe game costs 157,694 instructions to open, 806,604 for the first move, 436,658 and 322,130 for later moves, and 154,930 to reset. Over five repeated games the runtime returns to 11 live objects at every reset; the highest sampled count was 24; closing the game releases every object, string and array.
Binaries¶
The console command-line tool is 6,872,672 bytes and the native graphics host 8,714,704 bytes, both with debug information included; a whole-file size is not the cost of a feature or the memory a running program uses. The console tool does not depend on the window or GPU code at all. The runtime's public types have recorded sizes (StdHost 360 bytes, ScriptedHost 120, ConsoleIntentPort 352), not counting heap storage.
The WebAssembly modules¶
| Module | Raw bytes | Gzip bytes | SHA-256 |
|---|---|---|---|
dos_dbc_wasm_runner.wasm |
1,102,512 | 395,269 | 5db8d327719e25ae… |
dos_viewer_wasm.wasm |
1,657,743 | 528,314 | e05b6ce68b370195… |
dpython_compiler.wasm |
4,633,981 | 1,353,277 | 1a73bd76c4b52df1… |
Built 2026-09-12, target wasm32-unknown-unknown, profile browser-wasm-release, with rustc 1.91.1 (ed61e7d7e 2025-11-07) for aarch64-apple-darwin.
The gzip sizes are the packer's, with mtime set to zero. They are file and compression sizes, not the memory a browser uses, not a measurement of network transfer, and not compiler timing or scheduling deadlines. The modules the playground was tested with, built with Rust 1.97.1 on x86_64, were 4,499,379, 1,020,328 and 1,572,711 bytes; a later Linux build recorded 4,634,557 bytes for the Python compiler and 1,104,313 for the shared runtime. This site's bundle was built with the toolchain recorded in its manifest, and the exact hashes are the manifest's.
Limits the runtime enforces¶
| Limit | Value |
|---|---|
| live object identities per run | 256 |
| recursion | 128 calls, catchable |
| DBC string and pool entry | 65,535 bytes |
| hosted pool default | 8 MiB |
| browser source | 256 KiB |
| browser image, library | 512 KiB each, 8 libraries, 4 MiB total |
| browser slice | 5,000 instructions, 32 steps and a 6 ms allowance per turn |
Each limit is published and tested. When a program hits one, the runtime stops it and says so; running out of a resource is never turned into a wrong arithmetic answer.
What is not fixed yet¶
Python integers are stored as decimal strings in a standard form, in a shared library, and charged to the runtime's budgets. That was chosen for correct behavior with large numbers and for clarity, not as the final representation. Memory used while compiling, compiler size by component, memory per run and the longest uninterrupted stretch of work under interface load have no published budgets yet; the design rules say to set them after representative measurements on the real target machines, and until then this page reports observations only.