Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
native slice vs lodash chunk
native slice vs lodash chunk
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Browser:
Chrome 137
Operating system:
Linux
Device Platform:
Desktop
Date tested:
8 months ago
Test name
Executions per second
native slice
13265.6 Ops/sec
lodash chunk
5795.1 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var test = Array.from({ length: 100000 }, () => Math.random())
Tests:
native slice
const chunkSize = 80; const chunks = []; for (let i = 0; i <= test.length; i += chunkSize) { chunks.push(test.slice(i, i + chunkSize)); }
lodash chunk
_.chunk(test,80)