ros_comm
ros_comm copied to clipboard
Improve performance of ShapeShifter::read()
using resize causes an unnecessary call to memset. Replacing it with insert mitigates that.
Especially when handling lots of large messages (e.g. images) the overhead caused by memset is substantial.
This results in ~30% improved performance in my use-case.