In a C# console application I have a loop that iterates through about 8000 items in a collection, setting about eight strings equal to various properties of the items and then using those strings to perform a big variety of other operations. To keep my code organized I'm declaring all of the strings ahead of time and leaving them null until an item is read and the loop sets the appropriate string equal to the appropriate value. My question is, will there be a noticeable performance difference between declaring those strings outside of the loop versus inside? I know it will technically eat up some extra clock cycles declaring them each time the loop iterates, and after 8000 iterations that might start to add up, but I have no idea how much or if it will even matter? This application already takes a good half hour to complete its full cycle so a couple seconds of difference is insignificant, but if we're talking minutes obviously that's a bad thing.
Please keep in mind this is mostly a question of curiosity, I could honestly declare these variables wherever without affecting the application. I'm sure best practices state that they should always be outside the loop, but I've always wondered how much of a difference it really makes in this kind of low-impact operation.