Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
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
Test name
Executions per second
slice
24587666.0 Ops/sec
splice
16281201.0 Ops/sec
length
10719887.0 Ops/sec
pop
43813216.0 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();