3 ms·
No idea. Maybe less copying of memory? As far as I remember, C++ may implicitly copy values on some occasions (like returning from a function or pushing into a
by atomashpolskiy 9y ago
No idea. Maybe less copying of memory? As far as I remember, C++ may implicitly copy values on some occasions (like returning from a function or pushing into a vector), and in Rust non-primitive values are always moved, and to make an actual copy one has to explicitly opt in by using clone().