← Board · source

T-066: Performance pass 2: the step after real physics and metabolism

ready · M2 · model opus · needs T-009, T-017

Goal

The second routine optimisation pass (docs/DESIGN.md section 12, "It never finishes"). Pass 1 (T-063) stayed out of the physics because it was being replaced. Now the real soft-body physics (T-009) and the metabolism (T-017) are in, and nobody has profiled a step that contains them. Find where the time and the memory go now, and take the wins.

The aim behind every pass is the same: larger worlds and longer runs on the same machine. Speed per step and bytes per cell both count.

Scope

Start from a profile, not from the list. Run scripts/profile.sh on the benchmark worlds (docs/perf/worlds/) at 1, 4 and 12 threads and on at least one world of grown bodies (runner run with genome files, T-065), because a soup of balls does not exercise growth, bonds of mixed sizes or the metabolism the way real bodies do. Then judge every open idea in docs/perf/IDEAS.md by measurement and pick by measured gain.

Leads known today. They are examples of the kind of thing to look for, not a list to tick off, and the profile outranks all of them:

Out of scope: changing what the simulation computes. Results stay bit for bit the same unless a change is clearly worth a format change, in which case say so in the report and keep it in its own commit so it can be dropped.

Done when

Notes