ajile: Path Resolution Speed Test

JavaScript performance comparison

Revision 7 of this test case created by Mike Lee

Info

Tests how quickly each ajile version converts a multi-level namespace into a file path or URL.

Preparation code

<script type="text/javascript">

function ajile (version, onLoad, onError) {
   var script   = document.createElement ("script");
   script.type  = "text/javascript";
   script.async = false;
   ajile.script = script;

   onLoad  && (script.onload  = onLoad);
   onError && (script.onerror = onError);

   version      = version ? ("."+version+".") : ".";
   var host     = ajile.host [version];

   script.src   = ajile [host || "site"]
                + ajile.space + version + ajile.config
                ;
   document.lastChild.firstChild.appendChild (script);
}

ajile.cleanup = function unloadAjile () {
   try {
      Ajile.Unload();
   } catch (e) {
      window.console && console.log ("Failed to unload ajile "+Ajile.GetVersion());
   }
   ajile.script
   && (ajile.script.parentNode == document.lastChild.firstChild)
   && ajile.script.parentNode.removeChild (ajile.script)
   ;
   delete ajile.script;
   delete com.iskitz.ajile;
   delete window.Ajile;
   delete window.Import;
   delete window.ImportAs;
   delete window.Include;
   delete window.Namespace;
};

ajile.host =
{/*""      : "github"
,  ".src." : "github"
,*/

};

ajile.project   = "https://raw.github.com/iskitz/ajile/master/lib/ajile/";
ajile.site     = "http://ajile.net/use/";
ajile.space    = "com.iskitz.ajile";
ajile.config   = "js?cloak,mvcoff,mvcshareoff,override";

ajile.resolvePath = function testPathResolutionSpeed (deferred, version) {
  ajile
  ( version
  , function onAjileLoaded() {
      Namespace ("net", "http://ajile.net/test/");
      Import ("net.ajile.test.speed");
      deferred.resolve();
    }
  , function onAjileLoadError() {
      deferred.resolve();
      if (!this.Ajile) {
        throw new Error ("Unable to load ajile"+ version);
      }
  });//end:ajile()
};//end:ajile.resolvePath()

</script>

<!-- Prefetch ajile scripts so they're cached minimizing the likelihood of network latency negatively impacting the test results. -->

<script src="http://ajile.net/test/net.ajile.test.speed.js"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.1.9.9.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.1.7.3.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.1.6.8.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.1.5.5.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.1.4.5.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.1.3.8.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.1.2.1.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.1.1.5.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.0.9.9.2.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.0.7.9.js?cloak,mvcoff,mvcshareoff,override"></script>

<script src="http://ajile.net/use/com.iskitz.ajile.0.6.5.js?cloak,mvcoff,mvcshareoff,override"></script>
<script>
Benchmark.prototype.setup = function() {
    ajile.cleanup();
};
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
ajile
// async test
ajile.resolvePath (deferred);
pending…
ajile.0.6.5
// async test
ajile.resolvePath (deferred, "0.6.5");
pending…
ajile.0.7.9
// async test
ajile.resolvePath (deferred, "0.7.9");
pending…
ajile.0.9.9.2
// async test
ajile.resolvePath (deferred, "0.9.9.2");
pending…
ajile.1.1.5
// async test
ajile.resolvePath (deferred, "1.1.5");
pending…
ajile.1.2.1
// async test
ajile.resolvePath (deferred, "1.2.1");
pending…
ajile.1.3.8
// async test
ajile.resolvePath (deferred, "1.3.8");
pending…
ajile.1.4.5
// async test
ajile.resolvePath (deferred, "1.4.5");
pending…
ajile.1.5.5
// async test
ajile.resolvePath (deferred, "1.5.5");
pending…
ajile.1.6.8
// async test
ajile.resolvePath (deferred, "1.6.8");
pending…
ajile.1.7.3
// async test
ajile.resolvePath (deferred, "1.7.3");
pending…
ajile.1.9.9
// async test
ajile.resolvePath (deferred, "1.9.9");
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment