Size and performance
Limits
Resource |
Limit |
|---|---|
Code space |
4096 12-bit words |
Data RAM |
256 nibbles |
Usable compiler RAM |
176 nibbles ( |
Hardware call stack |
5 entries |
Non-tail user call depth |
4 |
Code-size budgets
Program |
Words |
RAM |
|---|---|---|
|
142 |
5 |
|
2573 |
134 |
|
2289 |
97 |
|
4064 |
129 |
tests/test_examples.py enforces the 4096-word limit.
tests/test_size.py keeps Tetris under a 2800-word budget.
Costs
A 32-bit multiply or divide uses a 24-nibble scratch block allocated only when the program uses those operators.
A 32-bit divide takes milliseconds at 250 kHz.
A 64-bit variable costs 16 nibbles. 64-bit expressions also reserve a result buffer and temporary slots. See 64-bit arithmetic.
A
halfcosts 4 nibbles; afloatcosts 8 nibbles. See Soft float.Struct size is padded to the next power of two. See Structs.
Runtime helpers are stripped when unreachable.
Function parameter and local slots are overlaid across functions that cannot be active at the same time.
Reports
Use --symbols, --stack, --map, and --map-json to measure a program.
See Diagnostics and reports.