Tag Archives: optimizations

Theory and Reality

One thing which I am pretty religious about is the placement of ++ and — in an expression. You have two options for where it can go. If it goes before the operand, it’s a pre-increment/decrement. If it goes after … Continue reading

Posted in C/C++ | Tagged , | Leave a comment

Tail Calls

A tail call is a specific pattern of source code where the last instruction executed in a method is another function call. For instance: In this code, the call to last is considered a tail call because there are no … Continue reading

Posted in C/C++ | Tagged , , | Leave a comment

The Plan and Random Points

For about six months, I managed to stick to a bi-weekly update schedule of Mondays and Fridays. However, I’ve exhausted my entire backlog of topics, as well as my todo list for things to write about. Instead of trying to … Continue reading

Posted in Uncategorized | Tagged , , | 1 Comment

Understanding Undefined Behavior

One of the harder concepts for people to understand in C++, in my opinion, is “behavior.” In C++, the language has some very specific wording for what the various behaviors are, and I’ve seen a lot of people get them … Continue reading

Posted in C/C++ | Tagged , | Leave a comment

Move Semantics

One of the new features in C++0x is a way to express move semantics. This is a sensible piece of sibling functionality to copy semantics, which you’ve likely already run into. When writing copy semantics for a class, the idea … Continue reading

Posted in C/C++ | Tagged , | Leave a comment