Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/design-decisions/opaque-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ because the presence bit is not reachable from the field expression itself. The
typical representation ends up being a pointer per field — `*int32`, `*bool`,
`java.lang.Integer` — which costs a machine word in the parent struct, a
separate allocation, an extra indirection on every read, and garbage collector
pressure, all to carry one bit. Even in languages like Rust with Option<T>, the
Open API precludes maintaining a dense hasbit bitmask over all of the fields,
and instead spreads out the option bit throughout the struct (including
pressure, all to carry one bit. Even in languages like Rust with `Option<T>`,
the Open API precludes maintaining a dense hasbit bitmask over all of the
fields, and instead spreads out the option bit throughout the struct (including
typically with a lot of wasting padding per field).

Dense hasbits are not just cheaper to store; they make whole-message operations
Expand Down
Loading