ajile: Path Resolution Speed

JavaScript performance comparison

Revision 2 of this test case created by Mike Lee

Preparation code

<script>

versions =
[  "src"
,  "1.2.1"
,  "0.9.9.2" //, "0.9.9.1", "0.9.9", "0.9.8",  "0.9.5", "0.9"
,  "0.7.9"   //, "0.7.8", "0.7.6"
,  "0.5.5"
];

function ajile () {
   var script   = document.createElement ("script");
   script.type  = "text/javascript";
   ajile.script = script;

   version      = versions.pop();
   version      = version ? ("."+version+".") : ".";
   var lib      = ajile.map [version];
   script.src   = ajile [lib || "net"]
                + ajile.space + version + ajile.config
                ;
   document.lastChild.firstChild.appendChild (script);
}

ajile.map =
{  ".src."  : "github"
,  ".1.2.1.": "github"
};

ajile.github = "https://raw.github.com/iskitz/ajile/master/lib/ajile/";
ajile.net    = "//ajile.net/use/";
ajile.space  = "com.iskitz.ajile";
ajile.config = "js?debugoff,mvcoff,mvcshareoff";

ajile.cleanup = function cleanup() {
   Ajile.Unload ("a.deeply.nested.non-existent.module");
   Ajile.Unload ();
   document.lastChild.firstChild.removeChild (ajile.script);
   delete ajile.script;
};

</script>
      
<script>
Benchmark.prototype.setup = function() {
  ajile();

};

Benchmark.prototype.teardown = function() {
  ajile.cleanup();
  

};
</script>

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
ajile
Import ("a.deeply.nested.non-existent.module");
pending…
ajile 1.2.1
Import ("a.deeply.nested.non-existent.module");
pending…
ajile 0.9.9.2
Import ("a.deeply.nested.non-existent.module");
pending…
ajile 0.7.9
Import ("a.deeply.nested.non-existent.module");
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.

0 Comments