Utility class for functions
<p>I'm trying to improve overall performance of a javascript application and i'm trying to create a utility class for all independent functions. Is it a good practice to do that?</p>

<p>Also i have read that is ok to use anonymous functions like this:</p>

<pre><code>(function(){

 var Utils = {
    test: function () { ... },
    test1: function () { ... }
    ...
 }

}())
</code></pre>

<p>But for some reason i am unable to use Utils.test() inside my other class, i get      </p>

<pre><code>ReferenceError: Utils is not defined
</code></pre>

<p>and now i am using </p>

<pre><code>  var Utils = {
   test: function () { ... },
   test1: function () { ... },
   ....
  }
</code></pre>

<p>will there be any improvements by doing so or should i just stick to classic separated functions</p>

<pre><code>function test() { ... }
function test1() { ... }
....
</code></pre>

<p>Thanks for any help</p>