Closed amcastro-tri closed 8 months ago
FYI, for inverse dynamics only 5% of the cost goes to malloc/free calls, so not a real bottleneck but definitely nice fixing.
@amcastro-tri please try out #10650 and see if it's useful for this purpose.
FYI, for inverse dynamics only 5% of the cost goes to malloc/free calls, so not a real bottleneck ...
The usual complaint with mallocs is less that they degrade the mean throughput, but rather that they can introduce relatively high jitter for operations' latency, especially as system load increases. Code in Drake that is going to be used for real-time control should (ideally) be written to avoid allocations after some start-up phase.
Related: #13186
We want to ensure that many of our building blocks in the multibody engine do not do any dynamic memory allocation after a context is created, for performance reasons.
For now this issue tracks:
from f2f @jwnimmer-tri, you mentioned you have ideas and even sample code for this?