> Then the function can be smart and apply the trans without memory reallocation.

So, would you check if the translation part of the 4x4 trans is empty and if so apply the trans without memory reallocation?