Fear of dying ++. Discuss.
In general, pre-increment can be implemented something like this:
increment through pointer
return value pointed to
while post-increment looks something more like:
read value through pointer
store it in temporary variable
increment through pointer
return value of temporary variable
It is clear that post-increment cannot normally be achieved as efficiently as pre-increment, and therefore it is wise to use pre-increment wherever possible - and always if you're not going to use the return value.
I'd therefore recommend writing ++ Fear of dying.
Hugo
|