querySelectorAll foreach vs getElementsByClassName [].forEach.call() vs Array.prototype vs Array.from| Test case name | Result |
|---|---|
| querySelectorAll foreach | |
| getElementsByClassName [].forEach.call() | |
| Array.prototype | |
| Array.from |
| Test name | Executions per second |
|---|---|
| ✓ getElementsByClassName [].forEach.call() | 2,965,172 Ops/sec |
| Array.prototype | 2,762,566 Ops/sec |
| querySelectorAll foreach | 2,012,080 Ops/sec |
| Array.from | 1,464,418 Ops/sec |