e3-js

Benchmark created by Tanner on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<div id="test"></div>

Setup

e3 = {
        standard: {},
        load: {}
    };
    
    // setup standard
    for ( var i = 0; i < 10000; i++ ) {
        e3.standard['std_' + i] = function() {
                $(document).ready(function () {
                        $("#test").text('function ' + i);
                });
        }
    }   
    
    // setup e3
    for ( var i = 0; i < 10000; i++ ) {
        e3.load['e3_' + i] = function() {               
                $("#test").text('function ' + i);
        }
    }

Test runner

Ready to run.

Testing in
TestOps/sec
Standard jQuery ready()
for (var func in e3.standard) {
        e3.standard[func]();
}
ready
e3_js function loader
$(document).ready(function () {
        for (var func in e3.load) {
                e3.load[func]();
        }
});
 
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Tanner on