08 Costs
Every evaluation reports its cost, dimmed, to the right of the result. A REPL with a database shows only the time of the request (With a database).
8.1. Evaluation
eval 57.9µs cpu · 130.5KiB peak · +4.6KiB net · 323.5KiB live
| Field | Meaning |
|---|---|
cpu |
CPU time spent evaluating the program |
peak |
The peak memory growth during evaluation |
net |
The change in memory use after evaluation (+ or -) |
live |
Memory in use after evaluation, including loaded namespaces |
cpu and memory are the quantities the engine's limits bound: a program that
exceeds either fails with #err <limit resource>. Costs vary from run to run,
so compare them by order of magnitude rather than exactly.
A regex pattern can contain at most 4,096 UTF-8 bytes and 16 capture groups. Each bound of a counted repetition is limited to 64. A pattern or search that exceeds available resources produces a resource-limit error.