News for hackers. Stuff that matters.
Re:Zlib-rs is faster than C by kibwen on Monday March 17, 2025 @01:31PM (#43390805)
Using references in unsafe Rust is harder than using raw pointers in C.

Using raw pointers in unsafe Rust is easier than using raw pointers in C.

The solution is to not manipulate references in unsafe code. The problem is that in old versions of Rust this was tricky. Modern versions of Rust have addressed this by adding first-class facilities for producing pointers without needing temporary references: https://blog.rust-lang.org/2024/10/17/Rust-1.82.0.html#nativ...

There are no comments on this comment yet.