Re:Is it time to stop using sentinel values for null / “NA” ...
by zabzonk on Monday June 05, 2023 @01:16PM
(#36199564)
ok, now explain how this " conflate memory layout and type definitions"
[ Parent
| on HN ]
Re:Is it time to stop using sentinel values for null / “NA” ...
by Dylan16807 on Monday June 05, 2023 @04:15PM
(#36202909)
It sticks a bool onto each value, directly attached in memory layout, taking up a byte plus padding bytes, multiplied by how many values you have.
(The compiler is allowed to improve this, but it won't.)
Re:Is it time to stop using sentinel values for null / “NA” ...
by morelisp on Tuesday June 06, 2023 @07:01AM
(#36210871)
The compiler is only vaguely allowed to do this by general "as if" rules; in practice there are so many formal constraints on field layout I don't think it could do better even with the world's most brilliant optimizer. It would need to behave "as if" if the two fields are laid out next to each other, in address-ascending order, with nothing but padding in between.