contextbindinginfunctions

Benchmark created on


Description

testing the performance of context binding in iterators

Preparation HTML

<script>
    var arrayModule = {
            array: [1,2,3,4,5,6,7,8,9,10],
            printValue: function(value){console.log(value);}
        };
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
native forEach context binding
arrayModule.array.forEach(function(number) {
  this.printValue(number);
}, arrayModule);
ready
cached context var
arrayModule.array.forEach(function(number) {
  arrayModule.printValue(number);
});
ready

Revisions

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