2 ms·
Rustface: Port of a C++ face detection library to Rust, outperforms the original
- atomashpolskiy 9y agoRustface is a very straight-forward port of a C++ face detection library, SeetaFace. I'm pleasantly surprised to see that the Rust version slightly but stably outperforms the original (by 4-5%).
- topspin 9y agoAny insight as to why it's 4-5% faster?
- atomashpolskiy 9y agoNo 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().