Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Add a lot of elements to array: slice and push vs destructuring
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0
Browser:
Firefox 144
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
9 months ago
Push
564/s
spread operator
297/s
View exact numbers
Test name
Executions per second
✓
Push
564 Ops/sec
spread operator
297 Ops/sec
Tests:
spread operator
const before = Array(100000).fill('before') const after = Array(100000).fill('after') const other = [ ...before, ...after ]
Push
const before = Array(100000).fill('before') const after = Array(100000).fill('after') const other = before.slice().push(...after)