18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 03:37:09 +01:00
Files
jerrrrycho 0de898ff33 perf(physics): the hose exchange after the update a cluster of trains at a time on the worker threads
The exchange of update_brake_pipes() goes through the trains of the hoses
on the threads of worker_pool. Trains which send air into the same vehicle
that didn't step its pipe (a sleeping wagon ends both of them) go together
in a cluster, in their order; the clusters share no vehicle. Each cluster
works out the sub-steps of all its trains first and then exchanges them in
order, as the serial loop does for all the trains. The clusters are kept
in the hose trains cache with the trains.

A unit test puts a sleeping wagon between two locomotives and runs the
clusters backwards: pressures bitwise the same as one after another.

Tomaszewo 600 s, seed 12345, LTO, interleaved with the commit before:
112.7 / 112.4 s vs 116.8 / 114.6 s (about -3%). Physics logs (14 and 9
files) and the event logs byte-identical. Unit tests 1208/1208.
2026-11-30 20:15:57 +01:00
..