Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
remove last array element (slice vs splice vs length vs pop)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser:
Chrome 130
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
pop
95.7M/s
slice
50.1M/s
splice
32.3M/s
length
30.5M/s
View exact numbers
Test name
Executions per second
✓
pop
95,695,936 Ops/sec
slice
50,085,712 Ops/sec
splice
32,341,968 Ops/sec
length
30,454,006 Ops/sec
Tests:
slice
let test_array = [1, 2, 3, 4]; test_array.slice(0, 3);
splice
let test_array = [1, 2, 3, 4]; test_array.splice(3, 1);
length
let test_array = [1, 2, 3, 4]; test_array.length = 3;
pop
let test_array = [1, 2, 3, 4]; test_array.pop();