Native bind vs lodash (v81)

Revision 81 of this benchmark created by fengb on


Preparation HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js">
</script>
<script>
  var lodash2 = _.noConflict();
</script>
<script src="//raw.githubusercontent.com/lodash/lodash/3.0.0/lodash.min.js"></script>
<script>
  var lodash3 = _.noConflict();
</script>

Setup

var t1 = (function (x) {
      return this + x;
    }).bind(1);
    
    var t2 = lodash2.bind(function (x) {
      return this + x;
    }, 1);
    
    var t3 = lodash3.bind(function (x) {
      return this + x;
    }, 1);

Test runner

Ready to run.

Testing in
TestOps/sec
Native bind
t1(1);
ready
Lo-Dash 2 bind
t2(1)
ready
Lo-Dash 3 bind
t3(1)
ready

Revisions

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