|
|
|
|
|
by pkolaczk
1639 days ago
|
|
Optional is only a part of the picture here. It also missed: * branch elimination with cmov * loop unrolling * SIMD vectorization * turning heap allocation into stack allocation All those things could be done without breaking any semantic guarantees of Optional even without value types in place. Also note how even forcing the Rust program to use references with double Box didn't make the code any worse. So Rust/LLVM had no issue optimizing that out even if Option was defined the way it is in Java now. |
|