Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
testing1234567899876
(version: 1)
Comparing performance of:
Splice vs Slice vs Length as 0
Created:
5 months ago
by:
Guest
Jump to the latest result
Tests:
Splice
const testArray = [1, 2, 3]; testArray.splice(0);
Slice
const testArray = [1, 2, 3]; testArray.slice();
Length as 0
const testArray = [1, 2, 3]; testArray.length = 0;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Splice
Slice
Length as 0
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
5 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.0.1 Safari/605.1.15
Browser/OS:
Safari 26 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Splice
25866922.0 Ops/sec
Slice
105162600.0 Ops/sec
Length as 0
32606372.0 Ops/sec
Related benchmarks:
spread array performance (vs slice, splice, concat)
splice-vs-sliceconcat-slicespread
spread array performance (vs slice, splice, concat, from)
spread array performance (vs slice, splice, concat)S
spread array performance (vs slice, splice, concat) 2
spread array performance (vs slice, splice, concat, Array.from)
spread array performance (vs slice, splice, concat)asd
spread array performance (vs slice, splice, concat, for)
array performance (vs slice, splice, length = 0)
Comments
Confirm delete:
Do you really want to delete benchmark?