musgo
musgo copied to clipboard
Performance Issue
MusGO uses value receiver for Size and Marshal methods. It's generally good idea for safety purpose but isn't good for some application like serializer that performance always is first priority. MusGo works well for object that uses pointer-like fields including maps and slices but it works slowly when the entity contains non-pointer fields like array, float, uint64 and ...
However apparently value receiver can be called by pointers also, but compiler replaces the pointer again and finally the method called by value.