Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
slice() vs slice(0)
(version: 1)
Comparing performance of:
slice() vs slice(0)
Created:
5 months ago
by:
Guest
Go to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const ARRAY = Array.from({ length: 10_000 }, (_, i) => i)
Tests:
slice()
ARRAY.slice()
slice(0)
ARRAY.slice(0)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
slice()
slice(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/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser/OS:
Chrome 143 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
slice(0)
2.1M/s
slice()
1.8M/s
View exact numbers
Test name
Executions per second
✓
slice(0)
2,122,286 Ops/sec
slice()
1,809,505 Ops/sec
Related benchmarks
slice vs get by index
slice vs length-1
at(-1) vs slice(-1)[0] vs length - 1
Comments
Confirm delete:
Do you really want to delete benchmark?