Javascript: Initial methods storage in prototype
<p>Are there any benefits from prototype methods except it's context and global availability across all instances?</p>

<p>Creating new instance of object without prototyped methods eats more memory than vice versa?   </p>

<p>Just can't understand, why some developers are storing initial methods inside prototype when shared context is not required.</p>

<p>The only thing i'm thinking about is memory usage...</p>

<pre><code>// first one
function t(){
    this.method1=function(){

    };
    this.method2=function(){

    };
}

// second one
function tt(){

}
tt.prototype={
    method1:function(){

    }
    ,method2:function(){

    }
}

var storage1=[];
var storage2=[];

var i=0;
while(i&lt;10000) {
    storage1.push(new t());
    storage2.push(new tt());    
    i++;    
}
</code></pre>
