Info
This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Implementing data structures that make use of reading uninitialized memory
I came accross this interesting trick for speeding up initialization of sparse data structures: research!rsc: Using Uninitialized Memory for Fun and Profit.
I tried to implement it in Rust, but ran into a seemingly fundamental problem. Even with unsafe, Rust seems to have no way to read uninitialized memory without causing undefined behavior.
Is there a way to implement this trick in Rust (without undefined behavior)? If not, are there any upcoming proposals that would allow implementing this trick?
1 post - 1 participant
🏷️ Rust_feed