Nobody ever got fired for using a struct
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
A performance investigation at Feldera revealed that SQL tables with hundreds of nullable columns caused significant serialization overhead when mapped to Rust structs. The root issue: rkyv's ArchivedString loses Rust's niche optimization, forcing an explicit Option discriminant, and with 700+ optional fields the archived
Table of contents
How it startedHow we use structsHow structs look like (in memory)How structs look like (on disk)Issue 1: Option<ArchivedString>Issue 2: Too Many Optionsrkyv to the rescue!Serializing and Deserializing StructsSparse rowsWhat changedThe lessonsSort: