|
|
|
|
|
by slashdev
712 days ago
|
|
No, there shouldn’t be. Rust is not magic and you can compile both with llvm (clang++). If you specify that the pointers don’t alias, and don’t use any language sugar that adds overhead on either side, the performance will be very similar. |
|
The Rust implementation even needs to use a few unsafe blocks (to work with UnsafeCells internally) but is mostly safe code. Other than that you can achieve the same in C++. But I think the real benefit is that you can write the rest of your code in safe Rust.