| ▲ | edflsafoiewq 3 hours ago | |
General theme: A programming language's native in-memory object format is typically optimized for random access, uniformity, and mutability (fields at fixed offsets, etc). Serialization formats for network or disk tend to be designed explicitly to be more compact. But you can design your own in-memory representation too, with the properties you need. | ||
| ▲ | kccqzy an hour ago | parent [-] | |
That’s the old school of thought. These days, designers of newer serialization formats realize that designing a more compact encoding doesn’t really buy much on modern CPUs. See for example Cap’n Proto (whose inventor also works at Cloudflare) and flatbuffers. | ||