jquery-lodash-map2

JavaScript performance comparison

Test case created and last updated

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://raw.github.com/bestiejs/lodash/v1.2.0/dist/lodash.min.js"></script>
<script>
var sel = $();
_.times(50, function (item) {
sel = sel.add($("<div>").addClass(String(item)).html(item));
});
</script>

Preparation code output

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
jqueryMap
$.map(sel, function (item) {
   return $(item).html();
}).join(",");
pending…
lodashmap
_.map(sel, 'innerHTML').join(",");
pending…

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

Compare results of other browsers

0 comments

Add a comment