This is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.
|Session Name:||Faster C++: Move Construction and Perfect Forwarding|
|Track / Format:||Programming|
For performance engineers, the most exciting new features of the C++11 Standard are move construction and perfect forwarding. Anybody who has analyzed C++ performance issues knows that the most inefficient aspect of C++ is object copying. Games often get bogged down copying objects inside frame loops. Rvalue references, a new C++ language feature, enable move semantics and perfect forwarding, completely eliminating unnecessary copies. The problem associated with the creation and destruction of temporary C++ objects goes away. The result: major performance improvements in common code. Simply recompiling with C++11 gives an automatic performance boost, but the true power comes when you add move constructors and move assignment operators to your own classes. This talk shows how to branch at compile time based on the condition that an object is moveable or not, with background on how rvalues really work, along with recommended idioms and best practices.