News for hackers. Stuff that matters.
Re:Overhead of Returning Optional Values in Java and Rust by mastax on Saturday October 16, 2021 @01:17PM (#28889443)
The most equivalent Rust type to `Long` would be `Option<Box<u64>>`, which is represented as a nullable pointer to a u64. `Box<Option<u64>>` is represented as a non-nullable pointer to a struct containing a u64 number and an aligned-to-u64 discriminant.

Does it change the benchmarks? Not if you let the inner function get inlined: https://rust.godbolt.org/z/Ejc5c7sE8

There are no comments on this comment yet.