Underscore Vs something else benchmark (v9)

Revision 9 of this benchmark created on


Description

Module import. A benchmark test that uses a script type="module" to import lodash.

Preparation HTML

<script type="module">
const {flatten} = await import ("https://cdn.jsdelivr.net/npm/lodash-es@4.17.21/lodash.min.js");

window.flatten = flatten;
</script>

Setup

const arr1 = [0, 1, 2, [3, 4]];

const reduceFlatten = (arr) =>  arr.reduce((flat, next) => flat.concat(next), []);

Test runner

Ready to run.

Testing in
TestOps/sec
sdf
flatten(arr1);
ready
df
arr1.flat();
ready

Revisions

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