underscore_mod-no-native [latest versions 08.11.2015/]

JavaScript performance comparison

Revision 19 of this test case created by Maciej Trębacz

Preparation code

<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js"></script>


<script>
var lodash = _.noConflict();
</script>
      
<script>
Benchmark.prototype.setup = function() {
  var numbers = [];
  var object = {};
  for (var i = 0; i < 20; i++) {
    numbers[i] = i;
    object['key' + i] = i;
  }
  var objects = _.map(numbers, function(n) { return { 'num': n }; });
  var randomized = _.sortBy(numbers, function() { return Math.random(); });

};
</script>

Preparation code output

<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.js"></script> <script> var lodash = _.noConflict(); </script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec

Revisions

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

0 Comments