Closed rneswold closed 3 years ago
With improved results after applying 21a0c040246c7dac981059c3239639a1df1de1ba, I feel keeping struct.unpack
out of the hot path is a good strategy.
Actually, this is an issue for the protocol compiler. (Keeping it open until the protocol compiler is moved to GitHub.)
800456340ea93f9268d9c97f9f6e057da783b547 adds an optimization to speed up decoding floating point numbers. It's a 20%-ish improvement. The same fix has been applied to the protocol compiler so all protocols for Python will eventually benefit.
https://github.com/fermi-controls/acsys-python/blob/2443be08fcd4e5ded21b263655e5bc50a9aa4b92/acsys/dpm/dpm_protocol.py#L1077
This looks inefficient. If we are sending over arrays of floats, this code may hamper throughout. We should measure this function against the performance of unmarshaling integers, for instance.