Decrease memory allocation during serialization

The final serialized string is constructed so that it is not necessary
to allocate the variable e_list.