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
@@ -4659,7 +4659,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
|
||||
type=ValueType(name='size_t'),
|
||||
),
|
||||
),
|
||||
doc='Allocate memory; byte-align on 8; pad size to multiple of 8.',
|
||||
doc='Allocate memory; byte-align on 64; pad size to multiple of 64.',
|
||||
)),
|
||||
('mju_free',
|
||||
FunctionDecl(
|
||||
|
||||
Reference in New Issue
Block a user