3 ms·
> (note: it doesn't!) That was tongue-in-cheek. Of course you can always find a slow instance for any approach. The more explicit message is: You're optimizin
by jstimpfle 8y ago
> (note: it doesn't!)
That was tongue-in-cheek. Of course you can always find a slow instance for any approach.
The more explicit message is: You're optimizing the wrong thing. "Tight loop" and "RVO", these things don't go together. Don't write slow and complicated code and expect the compiler to magically make it fast. Write straightforward code. It's easy. It will be effortlessly fast.
There are very few cases where you need to work hard to get fast code (SIMD etc). Typically, if you need to work hard, the code will be slow.