OOP vs Functional Calling Style (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script type="text/javascript" src="http://documentcloud.github.com/underscore/underscore-min.js"></script>
<script>
  var test = _.range(1, 1000)
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
OOP
_.each(test, function(element) {
 element += 1
});
ready
Functional
_(test).each(function(element) {
 element += 1
});
ready

Revisions

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