Here is the way I do things. I don't mean to lecture or something like that. Just my view of this, Good or Bad
when argument is a simple data type that won't be changed by called function - use int arg, float arg etc...
when argument is a complex data type that won't be changed by called function - use const TVec3& arg, const std::string& arg etc
when argument is a simple data type that will be changed by called function - use int& arg, float& arg
when argument is a complex data type that will be changed by called function - use TVec3& arg, std::string& arg
Depending of situation and implementation you can use pointers (*) instead of references (&)
If a function does not change any internal state (variable) of the class is should be declared const, like void myClass::isEverytingOK( ) const;
I strongly recommend to avoid to much typedef's. Use them with care like in
typedef std::map<std::string,myObect*> ObjectMap;
I strongly recommend to avoid macros and defines. Most time const static's, enums or inline functions can be used instead. This make things typed. And no "typedef int Speed;" or any such silly things. An int is an int
Furthermore in my experience (I'm no speed guru by anyway) the devil lies in nested inner loops and loading/saving. But in the projects I have done (99% non game related) the biggest time thief has ALWAYS been the program design.
Those are my humble thoughts that I live by. Surely not the truth or even the best thing but so far i found it best for me. Maybe for you also. If not, just ignore this post