OSC parsing code. Can it be optimised?
OSC is such a simple format that I ended up ditching libraries entirely, and just parsing the UDP packets directly with a state machine.  Just learn the wire format of the bytes and parse the state machine explicitly.

It's just a trivial function calling format.  The message starts with a 32-bit padded zero terminated string (important!) for the method name.  I am not sure if the type tag is mandatory but it was always being sent (ie: ",iff"), then the binary values corresponding to what type tag says - like bigendian int32,float32,float32.  

This was related to OSC generated by ChucK, SuperCollider, and CSound.

Real optimizations would come just from the design of the protocol itself.  You will need to assume that any UDP packet can be dropped.

You are sending motor changes as diffs from current position, so you need to handle packet drops somehow.  (ie: Do you have a TCP-like mechanism?  Do you change the design to send absolute motor positions so that position reports are idempotent and subject to re-broadcast?  Do you ack message receipt individually, or do you periodically poll the device for its current state?)