=rem #16428 optimize protobuf serializer for master

#16428 for master
very nice.
So I think that I will update it with the atomic reference one and the tailrec way.
cause the binding will not change so much after them bound.