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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
pop
43.8M/s
slice
24.6M/s
splice
16.3M/s
length
10.7M/s
View exact numbers
Test name
Executions per second
✓
pop
43,813,216 Ops/sec
slice
24,587,666 Ops/sec
splice
16,281,201 Ops/sec
length
10,719,887 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();