.length vs var
4 years ago
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36 Edg/87.0.664.47
Test name |
Executions per second |
accessing .length |
96333.9 Ops/sec |
storing and accessing variable |
95674.6 Ops/sec |
Tests:
-
accessing .length
-
storing and accessing variable
Open this result on MeasureThat.net