| c++ Programming Glossary: thumbWhy is processing a sorted array faster than an unsorted array? http://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array  with the branch when the data is sorted. A general rule of thumb is to avoid data dependent branching in critical loops. such.. 
 Pointer vs. Reference http://stackoverflow.com/questions/114180/pointer-vs-reference  reference   share improve this question   My rule of thumb is Use pointers if you want to do arithmetic with them or if.. 
 In what cases do I use malloc vs new? http://stackoverflow.com/questions/184537/in-what-cases-do-i-use-malloc-vs-new  If you're a C expert please let me know any rules of thumb or conventions you follow in this regard.  c memory management.. 
 Is it good practice to NULL a pointer after deleting it? http://stackoverflow.com/questions/1931126/is-it-good-practice-to-null-a-pointer-after-deleting-it  something similar would have been preferable. My rule of thumb is that if you leave pointers around in user code you're Doing.. 
 When to use std::size_t? http://stackoverflow.com/questions/1951519/when-to-use-stdsize-t   c size t   share improve this question   A good rule of thumb is for anything that you need to compare in the loop condition.. 
 How to pass objects to functions in C++? http://stackoverflow.com/questions/2139224/how-to-pass-objects-to-functions-in-c  by value c faq   share improve this question   Rules of thumb for C 11 Pass by value except when you do not need ownership.. much more attractive even for complex objects. Rules of thumb for C 03 Pass arguments by const reference except when they.. 
 in C++ , what's so special about “_MOVE_H”? http://stackoverflow.com/questions/3345159/in-c-whats-so-special-about-move-h  for me c 4.5.0 bits move.h #ifndef _MOVE_H As a rule of thumb don't use things really anything prefixed by _ or __ . It's.. 
 Operator overloading http://stackoverflow.com/questions/4421706/operator-overloading  the stream ™s state they should according to the rules of thumb be implemented as members of their left operand ™s type. However.. comparison operators should according to the rules of thumb be implemented as non member functions 1 . The unary prefix.. a reasonable use case for these 2 . 1 As with all rules of thumb sometimes there might be reasons to break this one too. If so.. 
 Virtual functions and performance - C++ http://stackoverflow.com/questions/449827/virtual-functions-and-performance-c  functions   share improve this question   A good rule of thumb is It's not a performance problem until you can prove it. The.. 
 When and how should I use exception handling? http://stackoverflow.com/questions/4506369/when-and-how-should-i-use-exception-handling  and error handling C FAQ lite As a general rule of thumb throw an exception when your program can identify an external.. 
 Inheritance or composition: Rely on “is-a” and “has-a”? http://stackoverflow.com/questions/453738/inheritance-or-composition-rely-on-is-a-and-has-a  inheritance and composition I usually use the rule of thumb if the relationship is is a use inheritance and if the relationship.. 
 mmap() vs. reading blocks http://stackoverflow.com/questions/45972/mmap-vs-reading-blocks  the input file gets scanned many times. Is there a rule of thumb for using mmap versus reading in blocks via C 's fstream library.. writing up a complete implementation first Any rules of thumb e.g. mmap is 2x faster or simple tests  c file io fstream mmap.. 
 Undefined Behavior and Sequence Points Reloaded http://stackoverflow.com/questions/4638364/undefined-behavior-and-sequence-points-reloaded  consecutive sequence points. Please recall the rule of thumb an expression can modify an object's value only once between.. 
 Subclass/inherit standard containers? http://stackoverflow.com/questions/6806173/subclass-inherit-standard-containers  by inheriting from the container. A good rule of thumb is if you can perform what you need using the public interface.. 
 C++: When to use References vs. Pointers http://stackoverflow.com/questions/7058339/c-when-to-use-references-vs-pointers  manipulations than any other constructs. So the rule of thumb is to use pointers only if there is no other choice. For example.. 
 |