Improve performance of getting and putting MJX device data by reducing cost of ncon.

PiperOrigin-RevId: 605454760
Change-Id: I5c52a84c12ab67d042fe43f6ada284b51a762294
This commit is contained in:
Erik Frey
2024-02-08 16:05:47 -08:00
committed by Copybara-Service
parent 3e2d62c248
commit 4933a2c7b6
4 changed files with 28 additions and 11 deletions
+6 -1
View File
@@ -8,7 +8,12 @@ Upcoming version (not yet released)
MJX
^^^
1. Improved performance of getting and putting device data by using a faster numpy array serialization method.
1. Improved performance of getting and putting device data.
- Use ``tobytes()`` for numpy array serialization, which is orders of magnitude faster than converting to tuples.
- Avoid reallocating host ``mjData`` arrays when array shapes are unchanged.
- Speed up calculation of ``mjx.ncon`` for models with many geoms.
- Avoid calling ``mjx.ncon`` in ``mjx.get_data_into`` when ``nc`` can be derived from ``mjx.Data``.
Version 3.1.2 (February 05, 2024)
-----------------------------------