title: How much memory is an empty JavaScript object?
body: <p><strong>Option A:</strong></p>
  
  <pre><code>myobj = {
      a: 'a',
      a1: 'a1',
      a2: 'a2',
      a2a: 'a2a',
      a2b: 'a2b',
      a3: 'a3',
      a3a: 'a3a',
      a3a1: 'a3a1',
      a3a2: 'a3a2',
      b: 'b',
      // ...
  };
  </code></pre>
  
  <p>vs.  <strong>Option B:</strong></p>
  
  <pre><code>myobj = {
      a: {
          a1: 'a1',
          a2: {
              a2a: 'a2a',
              a2b: 'a2b'
          },
          a3: {
              a3a: {
                  a3a1: 'a3a1',
                  a3a2: 'a3a2'
              }
          }
      },
      b: { ... }
  };
  </code></pre>
  
  <p>I'm weighing this as a design decision.  Here's a simpler case:</p>
  
  <p><strong>Option A:</strong></p>
  
  <pre><code>eventHandler: {
      triggerObj: triggerObj,
      triggerAction: triggerObj.someMethod,
      responseObj: responseObj,
      responseAction: responseObj.someMethod
  }
  </code></pre>
  
  <p>vs. <strong>Option B:</strong></p>
  
  <pre><code>eventHandler: {
      trigger: {
          obj: triggerObj,
          action: triggerObj.someMethod
      },
      response: {
          obj: responseObj,
          action: responseObj.someMethod
      }
  }
  </code></pre>
  
  <p>I'm pretty sure this is like the eye doctor:  <em>they're so close, it doesn't really matter.</em>  However, thought I'd see if there are any solid reasons for performance, or just for semantic/readability/other.</p>
  
  <p>Relating back to the question title: how many extra object braces would be necessary to have a notable performance issue?  I doubt even a few 1000 or even a 1,000,000 would matter much :-\</p>