.at(-1) vs length - 1 vs const LEN - 1158,254,608 ops/sec
152,686,784 ops/sec
151,544,336 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| .at(-1) | |
| length - 1 | |
| const LEN - 1 |
| Test name | Executions per second |
|---|---|
| ✓ length - 1 | 121,111,184 Ops/sec |
| const LEN - 1 | 115,323,264 Ops/sec |
| .at(-1) | 110,957,560 Ops/sec |