Optimizations (#168)

- Optimize contact prepare
- Back to post restitution stage
- Optimize solver math
- Bug fixes
This commit is contained in:
Erin Catto 2026-09-24 12:21:17 -07:00 • committed by GitHub
commit 79fc55976a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 3248 additions and 1519 deletions

View file

@ -1,9 +1,9 @@
threads,ms
1,13564.7
2,7058.44
3,4749.26
4,3596.92
5,2921.35
6,2478.9
7,2163.02
8,1919.1
1,13748
2,6965.15
3,4680.52
4,3551.71
5,2881.12
6,2436.97
7,2128.86
8,1895.85

1 threads ms
2 1 13564.7 13748
3 2 7058.44 6965.15
4 3 4749.26 4680.52
5 4 3596.92 3551.71
6 5 2921.35 2881.12
7 6 2478.9 2436.97
8 7 2163.02 2128.86
9 8 1919.1 1895.85

View file

@ -1,9 +1,9 @@
threads,ms
1,1341.05
2,697.405
3,467.98
4,355.631
5,285.912
6,240.761
7,210.048
8,187.1
1,1367.75
2,693.994
3,464.069
4,350.134
5,282.582
6,238.946
7,207.608
8,185.253

1 threads ms
2 1 1341.05 1367.75
3 2 697.405 693.994
4 3 467.98 464.069
5 4 355.631 350.134
6 5 285.912 282.582
7 6 240.761 238.946
8 7 210.048 207.608
9 8 187.1 185.253

View file

@ -1,9 +1,9 @@
threads,ms
1,14783.1
2,7859.85
3,5367.48
4,4115.03
5,3368.76
6,2874.23
7,2535.89
8,2277.2
1,13672.8
2,7175.79
3,4913.8
4,3784.71
5,3108
6,2664.34
7,2355.17
8,2130.17

1 threads ms
2 1 14783.1 13672.8
3 2 7859.85 7175.79
4 3 5367.48 4913.8
5 4 4115.03 3784.71
6 5 3368.76 3108
7 6 2874.23 2664.34
8 7 2535.89 2355.17
9 8 2277.2 2130.17

View file

@ -1,9 +1,9 @@
threads,ms
1,1852.7
2,978.38
3,665.353
4,505.116
5,411.56
6,356.776
7,307.866
8,276.957
1,1494.53
2,777.388
3,534.802
4,410.022
5,336.317
6,293.644
7,255.579
8,231.247

1 threads ms
2 1 1852.7 1494.53
3 2 978.38 777.388
4 3 665.353 534.802
5 4 505.116 410.022
6 5 411.56 336.317
7 6 356.776 293.644
8 7 307.866 255.579
9 8 276.957 231.247

View file

@ -1,9 +1,9 @@
threads,ms
1,7.1447
2,9.0736
3,10.1672
4,10.5088
5,11.0298
6,11.2858
7,11.378
8,11.4947
1,6.3724
2,8.1894
3,9.2282
4,9.5863
5,9.7645
6,9.7135
7,10.0949
8,10.2191

1 threads ms
2 1 7.1447 6.3724
3 2 9.0736 8.1894
4 3 10.1672 9.2282
5 4 10.5088 9.5863
6 5 11.0298 9.7645
7 6 11.2858 9.7135
8 7 11.378 10.0949
9 8 11.4947 10.2191

View file

@ -1,9 +1,9 @@
threads,ms
1,1947.41
2,1002.95
3,663.846
4,499.942
5,405.97
6,336.977
7,291.483
8,255.782
1,1716.24
2,863.727
3,564.346
4,431.892
5,350.505
6,294.929
7,249.838
8,217.224

1 threads ms
2 1 1947.41 1716.24
3 2 1002.95 863.727
4 3 663.846 564.346
5 4 499.942 431.892
6 5 405.97 350.505
7 6 336.977 294.929
8 7 291.483 249.838
9 8 255.782 217.224

View file

@ -1,9 +1,9 @@
threads,ms
1,2061.72
2,1139.07
3,794.05
4,622.555
5,516.441
6,446.451
7,399.084
8,364.345
1,2058.5
2,1111.94
3,774.168
4,613.062
5,506.603
6,441.273
7,393.697
8,364.168

1 threads ms
2 1 2061.72 2058.5
3 2 1139.07 1111.94
4 3 794.05 774.168
5 4 622.555 613.062
6 5 516.441 506.603
7 6 446.451 441.273
8 7 399.084 393.697
9 8 364.345 364.168

View file

@ -1,9 +1,9 @@
threads,ms
1,1051.05
2,568.185
3,390.055
4,304.593
5,251.978
6,221.25
7,200.171
8,185.485
1,841.682
2,452.523
3,317.294
4,244.096
5,209.411
6,186.295
7,169.097
8,159.324

1 threads ms
2 1 1051.05 841.682
3 2 568.185 452.523
4 3 390.055 317.294
5 4 304.593 244.096
6 5 251.978 209.411
7 6 221.25 186.295
8 7 200.171 169.097
9 8 185.485 159.324

View file

@ -1,9 +1,9 @@
threads,ms
1,3152.3
2,1832.83
3,1315.75
4,1058.49
5,903.367
6,801.254
7,738.93
8,695.326
1,3133.28
2,1789.12
3,1283.52
4,1028.48
5,879.763
6,792.053
7,725.787
8,700.573

1 threads ms
2 1 3152.3 3133.28
3 2 1832.83 1789.12
4 3 1315.75 1283.52
5 4 1058.49 1028.48
6 5 903.367 879.763
7 6 801.254 792.053
8 7 738.93 725.787
9 8 695.326 700.573

View file

@ -1,9 +1,9 @@
threads,ms
1,170.933
2,112.916
3,89.6041
4,79.6461
5,75.7754
6,73.2911
7,71.7742
8,70.7292
1,169.469
2,108.928
3,87.0377
4,78.2135
5,74.7472
6,72.3567
7,71.2555
8,69.4727

1 threads ms
2 1 170.933 169.469
3 2 112.916 108.928
4 3 89.6041 87.0377
5 4 79.6461 78.2135
6 5 75.7754 74.7472
7 6 73.2911 72.3567
8 7 71.7742 71.2555
9 8 70.7292 69.4727

View file

@ -1,9 +1,9 @@
threads,ms
1,680.981
2,400.129
3,296.389
4,252.676
5,229.879
6,214.117
7,204.083
8,196.839
1,705.33
2,395.666
3,288.224
4,250.774
5,227.915
6,213.331
7,199.236
8,197.301

1 threads ms
2 1 680.981 705.33
3 2 400.129 395.666
4 3 296.389 288.224
5 4 252.676 250.774
6 5 229.879 227.915
7 6 214.117 213.331
8 7 204.083 199.236
9 8 196.839 197.301

View file

@ -1,9 +1,9 @@
threads,ms
1,295.508
2,183.122
3,139.634
4,121.466
5,113.262
6,106.697
7,103.854
8,101.959
1,292.4
2,176.437
3,136.132
4,119.305
5,112.324
6,104.356
7,100.668
8,101.573

1 threads ms
2 1 295.508 292.4
3 2 183.122 176.437
4 3 139.634 136.132
5 4 121.466 119.305
6 5 113.262 112.324
7 6 106.697 104.356
8 7 103.854 100.668
9 8 101.959 101.573

View file

@ -1,9 +1,9 @@
threads,ms
1,19931.1
2,10626.7
3,7300.85
4,5627.16
5,4603.18
6,3931.89
7,3454.58
8,3273.54
1,19731.4
2,10458
3,7085.75
4,5383.4
5,4383.12
6,3769.83
7,3321.09
8,3064.85

1 threads ms
2 1 19931.1 19731.4
3 2 10626.7 10458
4 3 7300.85 7085.75
5 4 5627.16 5383.4
6 5 4603.18 4383.12
7 6 3931.89 3769.83
8 7 3454.58 3321.09
9 8 3273.54 3064.85

View file

@ -188,6 +188,7 @@ int main( int argc, char** argv )
.solveImpulses = FLT_MAX,
.integratePositions = FLT_MAX,
.relaxImpulses = FLT_MAX,
.restitution = FLT_MAX,
.storeImpulses = FLT_MAX,
.splitIslands = FLT_MAX,
.transforms = FLT_MAX,