Although it's really great to point out and discuss low level performance concerns for things like loops...
The majority of the time it's better to have maintainable and readable code over optimized code. Compilers and garbage collectors usually do a good job most of the time!
IMO creating variables outside a loop for the sake of optimization adds code smells for little to no benefit!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Although it's really great to point out and discuss low level performance concerns for things like loops...
The majority of the time it's better to have maintainable and readable code over optimized code. Compilers and garbage collectors usually do a good job most of the time!
IMO creating variables outside a loop for the sake of optimization adds code smells for little to no benefit!