title: Performance of javascript Class definitions vs Objects
body: <p>I'm writing a javascript application that extensively uses a particular form of dataset, like </p>
  
  <pre><code>{ foo: 'foo', bar: 'bar', quz: { baz : 'baz' }}
  </code></pre>
  
  <p>It's only data, but it's nested. There is no static data.</p>
  
  <p>I want to create a template for that dataset to keep the code clean. I can either put a template object somewhere and clone that everytime, like (using jquery just for the example)</p>
  
  <pre><code>var ds = jQuery.extend(true, {}, config.dataset);
  </code></pre>
  
  <p>or I can create a 'Class' or function prototype that I can call with</p>
  
  <pre><code>var ds = new Dataset();
  </code></pre>
  
  <p>What performs best ? If using the <code>new</code> constructor, is there a difference between a Class and a function definition ?</p>