array.push vs set.addFastest: array.push (7.1x faster)
124,971 ops/sec
17,575 ops/sec
Fastest: array.push (9.1x faster)
126,995 ops/sec
13,984 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| array.push | |
| set.add |
| Test name | Executions per second |
|---|---|
| ✓ array.push | 126,995 Ops/sec |
| set.add | 18,409 Ops/sec |