Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
set.add vs array.push
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/131.0.6778.154 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 131
Operating system:
iOS 18.2.1
Device Platform:
Mobile
Date tested:
one year ago
Benchmark engine:
Benchmark.js
array.push
78K/s
set.add
22K/s
View exact numbers
Test name
Executions per second
✓
array.push
78,336 Ops/sec
set.add
22,165 Ops/sec
Tests:
array.push
const a = [] for (let i = 0; i < 3000; i++) a.push(i)
set.add
const s = new Set() for (let i = 0; i < 3000; i++) s.add(i)