Commit 3e94c1d
committed
Skip UpdateStaticness per-agent work when detect_static_agents is false
UpdateStaticnessOp called Simulation::GetActive()->GetParam() and
wrote two booleans for every agent every step, even when
detect_static_agents was false (the default). Both values are
already initialized to false, so the writes were redundant. Cache
the flag once per step in SetUp and return immediately from the
per-agent call when the feature is disabled.1 parent 67c8d6f commit 3e94c1d
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
52 | 63 | | |
53 | 64 | | |
54 | 65 | | |
| |||
0 commit comments