test-map-as-loop

Benchmark created by Jeff on


Preparation HTML

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

Setup

var bench = Benchmark({
      'setup': function() {
        holdArray = [];
    });

Test runner

Ready to run.

Testing in
TestOps/sec
JS map
var result = map(testArray, double);
ready
JQ map
var result = $.map(testArray, double);
ready
JQ each
var result = $.each(testArray, double);
ready
For
for (var i = 0; i < testArray.length; i++) {        
                holdArray.push(testArray[i]);      
        }  
ready

Revisions

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