getAttribute vs dataset vs has attrFastest: has attr (2.7x faster)
4,706 ops/sec
4,326 ops/sec
1,741 ops/sec
Fastest: has attr (103.3x faster)
110,731 ops/sec
110,600 ops/sec
1,072 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| getAttribute | |
| dataset | |
| has attr |
| Test name | Executions per second |
|---|---|
| ✓ getAttribute | 1,729 Ops/sec |
| has attr | 1,618 Ops/sec |
| dataset | 902 Ops/sec |