News for hackers. Stuff that matters.
Re:An embedded database written in Rust by steveklabnik on Monday May 28, 2018 @07:08AM (#17171790)
As the person who wrote those paragraphs, yes. The fundamental reason unsafe exists is not for performance reasons. That being said, the parent is also true that sometimes, unsafe is used to enhance performance. But that's not the usual case, and in fact, can even hurt performance in ways. For example, &mut T can't alias, but *mut T can, and so &mut T can be optimized more aggressively. (We recently turned these optimizations back on: https://github.com/rust-lang/rust/pull/50744 )

There are no comments on this comment yet.