Replaces the two-pass (compute size, then write) approach with single-pass type-specific writers that reserve placeholder space for the length prefix and patch it in afterward, falling back to two-pass only for very large lists. Output bytes unchanged.
Benefit: cuts a full extra pass over packed integer lists on the write path — same wire format, fewer CPU cycles.
PR: #917
Replaces the two-pass (compute size, then write) approach with single-pass type-specific writers that reserve placeholder space for the length prefix and patch it in afterward, falling back to two-pass only for very large lists. Output bytes unchanged.
Benefit: cuts a full extra pass over packed integer lists on the write path — same wire format, fewer CPU cycles.
PR: #917