⚡ Build the skills to land top-paying quant jobs. Offer ends in 23d 14h 02m 21s23 days 14 hours 2 minutes 21 seconds.
⚡ Build the skills to land top-paying quant jobs. Offer ends in 23d 14h 02m 21s23 days 14 hours 2 minutes 21 seconds.

Sign in to watch this lesson
Value Categories, Move and Perfect Forwarding · 3:37
A move is cheap only when there is a heap pointer to steal. We time a vector move against a std::array move (about a nanosecond against several microseconds on a Mac), look inside a std::string to see the small-string optimization keep short names in the handle itself, and catch the cases where a move silently becomes a copy: a user-declared destructor, a const source, and a move constructor that isn't noexcept.