koEachVsFirst3 (v7)

Revision 7 of this benchmark created on


Preparation HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/ext-core/3/ext-core.js"></script>
<script src='http://ajax.aspnetcdn.com/ajax/knockout/knockout-3.3.0.js'></script>

Setup

var array=[];
    for(var i=0;i<100000;i++){
    array.push(i);
    }

Test runner

Ready to run.

Testing in
TestOps/sec
foreach


ko.utils.arrayForEach(array, function(item){
return item==1000000});
ready
first

ko.utils.arrayFirst(array, function(item){
return item==1000000});
ready

Revisions

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