3 ms·
> The performance hit isn't as it bad as it seems, because you only adjust the reference counts when you actually take an extra reference. This is different fro
by gok 9y ago
> The performance hit isn't as it bad as it seems, because you only adjust the reference counts when you actually take an extra reference. This is different from shared_ptr in C++, because C++ automatically calls the copy constructor and so it's easy to end up with lots of reference count traffic.
Well only if you pass shared_ptr by value, which isn’t really idiomatic. But yeah the default is dumb in C++ and smart in Rust.