unzip-vs

JavaScript performance comparison

Test case created and last updated

Info

Lo-Dash's _.unzip method is ~150 bytes gzipped, Underscore's is is ~103 bytes.

The diff in size is 47 bytes. Is the bytes worth the perf? Let's see!

Preparation code

<p>

<script src="//rawgithub.com/documentcloud/underscore/556be78cbc4aa46fc6a305e52a01388fc812dc8c/underscore.js"></script>
<script src="//rawgithub.com/bestiejs/lodash/b0a2a8e09852d81b78caf6c21ba6c0ce71a44d52/lodash.js"></script>
<script>
var lodash = _.noConflict();
</script>
<script>
Benchmark.prototype.setup = function() {
    var _ = window._,
        lodash = window.lodash,
        array = [["a", 1, true], ["b", 2, false], ["c", 3, true]];
};
</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
Underscore Edge
_.unzip(array);
pending…
Lo-Dash Edge
lodash.unzip(array);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment