Precompute serialized datum sizes to avoid O(n^2) worst-case serialization costs