CUFCTL / face-recognition

A GPU-accelerated real-time face recognition system based on classical machine learning algorithms
MIT License
23 stars 11 forks source link

Review code for move semantics and other C++ optimizations #38

Closed bentsherman closed 7 years ago

bentsherman commented 7 years ago

Now that most of the code has been refactored to use C++ features (classes, STL containers, etc.), we should review the code at some point for any further optimizations. C++ removes most of the memory management, but things like copy constructors and assignment operators can be tricky to implement and can lead to memory overhead if they aren't correct. The main focus is matrix operations -- review places where temporary matrices are created, and make sure that matrix copies don't occur more often than necessary.

bentsherman commented 7 years ago

I tested memory usage by placing print statements in the copy constructors and move constructors to see when matrices were being copied / moved. Everything looks good so I'm closing this issue.