Improves performance of the EntityBase.serialize() method by ~30%. (Also improving readability slightly, IMO)
Improves performance of the EntityBase.serialize() method by ~30%.
(Also improving readability slightly, IMO)

PiperOrigin-RevId: 359383966

PolymerLabs/arcs,PolymerLabs/arcs,PolymerLabs/arcs,PolymerLabs/arcs,PolymerLabs/arcs,PolymerLabs/arcs,PolymerLabs/arcs,PolymerLabs/arcs