Align all arrays in mjData's buffer to 64 byte boundaries.
The introduction of additional mjData arrays for the implicit integrator caused in a shift in data alignment in memory. In certain combinations of machines and models, this change resulted in ~5% performance regression that appears to be attributable to L2 cache misses. This change aligns all arrays in mjData to the boundary of a typical L2 cache line size. Benchmarking shows that this resolves the performance regression on a Broadwell machine. PiperOrigin-RevId: 451652783 Change-Id: I4ed2c2d03453a83a0b4a9b8e224e2fd7c0dadea9
This commit is contained in:
committed by
Copybara-Service
parent
981fa22302
commit
5cc73c30bf
@@ -5501,7 +5501,7 @@ mju_malloc
|
||||
|
||||
void* mju_malloc(size_t size);
|
||||
|
||||
Allocate memory; byte-align on 8; pad size to multiple of 8.
|
||||
Allocate memory; byte-align on 64; pad size to multiple of 64.
|
||||
|
||||
.. _mju_free:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user