4. Costs
Every evaluation reports its cost, dimmed, to the right of the result. A form that had to be compiled first reports the compile on its own line above.
Table of Contents
4.1. Evaluation ↑
eval 57.9µs cpu · 130.5KiB peak · +4.6KiB net · 323.5KiB live
| Field | Meaning |
|---|---|
cpu |
CPU time spent running the compiled program |
peak |
The peak heap growth during evaluation |
net |
How much larger (+) or smaller (-) the heap is afterwards; a negative value means a collection ran |
live |
The heap size 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.
Epsilon's native regex compiler currently limits a pattern to 4,096 UTF-8 bytes, 256 compiled states, and 16 capture groups. Each bound of a counted repetition is limited to 64. Exceeding compiler capacity reports a resource limit. A search also has a work limit, in addition to the runtime's CPU and memory limits. The compiled-pattern cache holds up to 64 entries per runtime.
4.2. Compilation ↑
compile 77.9µs · 143.1KiB arena · key 5d902e22 · 1/64 cached
| Field | Meaning |
|---|---|
| first value | Time to compile and prepare the program |
arena |
Memory the cached program keeps |
key |
The start of the program's cache key, a hash of its canonical DUST |
1/64 cached |
Programs now cached, of the cache's capacity |
The REPL caches compiled programs, keyed by the hash of their canonical DUST,
and evicts the least recently used program when the cache is full. Because the
key is canonical, (+ 1 2) and (+ 1 2) share one program, and repeating a
form prints no compile line. Cached programs live in their own arenas,
separate from the memory each evaluation uses.