Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Append with toSpliced vs Spread
(version: 1)
Benchmark.js
Comparing performance of:
toSpliced vs Spread
Created:
10 days ago
by:
Guest
Go to the latest result
Script Preparation code:
var array = Array.from({ length: 100 }).map((val, i) => i);
Tests:
toSpliced
var newArray = array.toSpliced(array.length, 0, 99);
Spread
var newArray = [...array, 99]
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
toSpliced
Spread
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
10 days ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:155.0) Gecko/20100101 Firefox/155.0
Browser/OS:
Firefox 155 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
toSpliced
20.5M/s
Spread
3.0M/s
View exact numbers
Test name
Executions per second
✓
toSpliced
20,478,854 Ops/sec
Spread
3,009,881 Ops/sec
Related benchmarks
spread vs slice vs splice
Splice vs Spread vs Unshift to insert at beginning of array
Splice vs Spread vs Unshift to insert at beginning of array (fixed from slice)
toSpliced vs Spread
Using Splice vs Spread vs Unshift to insert at beginning of array
Comments
Confirm delete:
Do you really want to delete benchmark?