array[array.length - 1] vs array.at(-1)42,834,836 ops/sec
41,075,860 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| array[array.length - 1] | |
| array.at(-1) |
| Test name | Executions per second |
|---|---|
| ✓ array.at(-1) | 98,166,528 Ops/sec |
| array[array.length - 1] | 97,310,216 Ops/sec |