Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
spread before shallow copy array method
(version: 1)
Comparing performance of:
with spread vs without spread
Created:
one year ago
by:
Registered User
Go to the latest result
Script Preparation code:
const array = Array.from({ length: 1_000_000 }, (_, i) => i);
Tests:
with spread
;[...array].filter((i) => i % 2);
without spread
;array.filter((i) => i % 2);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
with spread
without spread
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser/OS:
Chrome 133 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
without spread
107/s
with spread
29/s
View exact numbers
Test name
Executions per second
✓
without spread
107 Ops/sec
with spread
29 Ops/sec
Related benchmarks
Array.from vs Spread Arrays
Array.from() vs spread []
Comments
Confirm delete:
Do you really want to delete benchmark?