Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Slice vs toSpliced
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0
Browser:
Firefox 128
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
Slice
16.8M/s
toSpliced
9.7M/s
View exact numbers
Test name
Executions per second
✓
Slice
16,784,402 Ops/sec
toSpliced
9,733,560 Ops/sec
Script Preparation code:
var arr = ['a', 'b', 'c', 'd', 'e', 'f', 'g']; var numberToRemove = 2;
Tests:
Slice
arr.slice(numberToRemove)
toSpliced
arr.toSpliced(0, numberToRemove)