title: C++ Performance/memory optimization guidelines
body: <p>Does anyone have a resource for C++ memory optimization guidelines? Best practices, tuning, etc?</p>
  
  <p>As an example:</p>
  
  <pre><code>Class xxx {
  
      public: 
          xxx();
          virtual ~xxx();
  
      protected:
  
      private:
  
  };
  </code></pre>
  
  <p>Would there be ANY benefit on the compiler or memory allocation to get rid of protected and private since there there are no items that are protected and private in this class?</p>
  
  <p>UPDATE: What is a programmer does this:</p>
  
  <pre><code>Class xxx {
  
      public: 
          xxx();
          virtual ~xxx();
  
      public:
          more stuff();
          more();
  
     ifndef __BUILD_WIN__
        public:
          even more();
          envenmore2();
     endif
      protected:
  
      private:
  
  };
  </code></pre>