| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Folding every event into persistent state at every moment cost 750 bytes a
step and 2 KB a scattered 8-byte write: the tree's path copied each time.
Now a moment stores its events alone, in a compact code (a flags byte,
varints, time as a difference, registers as the ones that changed), and the
state (threads, memory, heap, variables, mappings, strings) is written at a
keyframe a batch, sharing with the one before. A reader replays at most a
batch over a keyframe, and keeps four positions replayed, so playing
forward reads one moment a step.
Of a memory write the recorder keeps the spans that differ from what it
holds, so a region read again costs what changed in it. It stops at
max_bytes (1 GiB).
A step with registers: 749 bytes to 57. fib(12) by instruction, 142 000
moments: 111 MB to 8 MB, 197 000 moments/s. bench-store measures the rest.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mappings in each
A transaction a moment cost 10 µs and 1 KB before the moment's own data:
the list's path copied each time. Moments now gather 256 to a transaction,
each frozen by its own cursor so the list grows in place, and a thread's
fields sit in the moment's map instead of two maps down: a small moment is
284 bytes and 1 µs, an instruction step with registers 780 bytes.
A moment also folds alloc/free into the live heap, call/ret into each
thread's stack, variable into the live variables (a local leaves with its
call), line, and map/unmap, so a viewer reads any of them at any moment
without replaying.
|