alamb commented on pull request #8303:
URL: https://github.com/apache/arrow/pull/8303#issuecomment-701303597
> Doesn't an Option of a reference leverages null pointer optimization (on
which None is represented by the null pointer, e.g. rust-lang/rust#9378)?
@jorgecarleitao I believe you are correct:
This program:
```
fn main() {
println!("The size of a &str is {}", std::mem::size_of::<&str>());
println!("The size of an Option<&str> is {}",
std::mem::size_of::<Option<&str>>());
}
```
Produces the following on my machine:
```
The size of a &str is 16
The size of an Option<&str> is 16
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]