Repository navigation
Commit b6f0675
authored
Fuse the three jacobian dot products into one horizontal reduction. (#2151)
SolveVelocityConstraintGetTotalLambda computed three independent Vec3::Dot
calls and summed the scalar results. Since Dot(a,b) = sum_xyz(a*b), the sum of
the dots equals a single reduction of the component-wise sum of products, so
the two redundant horizontal reductions can be removed from the latency-bound
critical path. Accumulate component-wise into a Vec3 and call ReduceSum() once.
Performance uplift about 3% for Pyramid test with 300 iterations.
Cross-platform determinism is preserved but results changed (fewer roundings),
so the determinism check hashes have been regenerated.1 parent 8c605f1 commit b6f0675
2 files changed
Lines changed: 18 additions & 17 deletions
File tree
- .github/workflows
- Jolt/Physics/Constraints/ConstraintPart
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | 182 | | |
184 | | - | |
| 183 | + | |
185 | 184 | | |
186 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
0 commit comments