getAttribute vs dataset vs new Map();Fastest: new Map(); (26.4x faster)
108,580 ops/sec
7,321 ops/sec
4,114 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 | |
| new Map(); |
| Test name | Executions per second |
|---|---|
| ✓ new Map(); | 156,517 Ops/sec |
| getAttribute | 8,077 Ops/sec |
| dataset | 4,123 Ops/sec |