all of the changes

This commit is contained in:
2026-10-23 18:29:51 +02:00
parent 4c435fdd76
commit 5607dcf2b5
73 changed files with 4365 additions and 2059 deletions

View File

@@ -29,9 +29,9 @@ tolerance; long engine/audio traces need not be bit-identical to the reference.
A `-pg` build running every scenario for two simulated seconds attributed about
39% of sampled executable time to pipe advancement, 38% to orifice boundary
solves, and 13% to Solver::step (including inlined preparation). Turbo mechanics
were under 1% and outdoor emitter rendering about 1%. These are sampled gprof
results, not precise attribution of time inside dynamically linked math functions.
solves, and 13% to Solver::step (including inlined preparation). Outdoor emitter
rendering was about 1%. These are sampled gprof results, not precise attribution
of time inside dynamically linked math functions.
`fluidsim_thread_benchmark` now uses each scenario's actual pipe geometry and
compares persistent 1/2/4-worker execution with barriers per substep. This isolates
@@ -52,7 +52,6 @@ Mean wall seconds per simulated second, six-second sustained-load runs:
| Scenario | Reference | Optimized | Time reduction | SIMD disabled |
|---|---:|---:|---:|---:|
| Twin | .528 | .405 | 23% | .423 |
| Turbo twin | 1.368 | .649 | 53% | .684 |
| B205 | .884 | .689 | 22% | .737 |
| Two-stroke racing | .561 | .470 | 16% | .535 |
| Two-stroke straight | .539 | .464 | 14% | .525 |
@@ -60,7 +59,7 @@ Mean wall seconds per simulated second, six-second sustained-load runs:
| Pulse | .256 | .238 | 7% | .315 |
Idle/transient optimized means (seconds per simulated second): twin .394/.399,
turbo .627/.651, B205 .666/.683, racing two-stroke .450/.459, straight two-stroke
B205 .666/.683, racing two-stroke .450/.459, straight two-stroke
.452/.453, Helmholtz .141/.140, and pulse .238/.238.
The pulse scenario has no orifice, so its improvement isolates the SIMD-friendly
@@ -69,7 +68,7 @@ native-instruction build improves some timings further, but is not shipped as
the default: FMA also changes rounding and the binary is CPU-specific.
Initial isolated changes measured approximately .40 seconds for the twin after
boundary warm starts alone (previously .53). The sustained turbo still took
boundary warm starts alone (previously .53). The sustained high-load scenario still took
about 1.2 seconds after that change; eliminating subnormal tracer tails brought
it to about .65. The diagnostic found 22 subnormal pipe fields before truncation
and zero afterwards. This is distinct from reducing CFL substeps or geometry;
@@ -79,8 +78,9 @@ performance for every user configuration or arbitrarily long simulation.
## Reproduction
Final validation: all nine CTest suites passed both with SIMD enabled (28.50 s)
and disabled (30.86 s). The fluid validation executable includes 30 checks,
Final validation at the time of this audit: all nine then-registered CTest
suites passed both with SIMD enabled (28.50 s) and disabled (30.86 s). The
fluid validation executable includes 30 checks,
including tracer underflow conservation. The Release SFML desktop target also
rebuilt successfully. This audit verifies desktop compilation and headless audio
rendering; interactive playback underrun testing remains a separate user check.
@@ -95,12 +95,12 @@ ctest --test-dir build-opt --output-on-failure
./build-opt/fluidsim_thread_benchmark
```
The scenario benchmark runs twin, turbo twin, B205, racing and straight-pipe
The scenario benchmark runs twin, B205, V8, racing and straight-pipe
two-strokes, Helmholtz and pulse scenarios, including their normal audio path.
`loaded` holds four-strokes at 7,000 RPM and two-strokes at 10,000 RPM using an
ideal speed-holding dyno; engine throttle is 70%. `idle` releases the pedal;
`transient` starts released, applies 70%, then releases for the last two seconds.
The optional final argument selects one scenario, e.g. `6 loaded turbo`.
The optional final argument selects one scenario, e.g. `6 loaded v8`.
CSV timing/checksum goes to stdout; subnormal and iteration diagnostics go to
stderr. Inspection happens outside the timed sample-processing loop.