Pizer’s Weblog

programming, DSP, math

Posts Tagged ‘copy elision

C++: Exploiting Copy Elisions

with 8 comments

This article is about writing efficient code and giving the compiler opportunities for optimizations with respect to copying / “moving” objects in good old C++98. I use a simple function as an example but it should extend to other cases as well. The technique that is described here (“swaptimization”) is not entirely new and I can’t take credit for it. But it is probably little-known which is a good reason to write about it. 🙂

Read the rest of this entry »

Written by pizer

June 25, 2009 at 4:57 pm