Commit d7b6e5b
Reuse ShapeSupportData in CastHullShape to avoid per-call allocation
CastHullShape::computeShapeSupport called getSupport(shape, dir, hint)
which created a fresh ShapeSupportData every call, forcing
getShapeSupportLog to reallocate its visited vector on every support
query. Store two persistent ShapeSupportData members (one per pose) and
pass them to the new getSupport overload. The visited vector is now
allocated once and reused via std::fill on subsequent calls.
Measured: getShapeSupportLog self-time dropped from 2.65% to 2.04%.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 2e75a35 commit d7b6e5b
2 files changed
Lines changed: 12 additions & 6 deletions
File tree
- tesseract/collision/coal
- include/tesseract/collision/coal
- src
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
148 | 149 | | |
149 | | - | |
| 150 | + | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
156 | | - | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
0 commit comments