Something I learned today, worth remembering for performance reasons. Static variable defined inside a method is actually a global variable, which is visible only inside that method!
What this means is that you can increase your method performance by declaring variable only once and reuse it when needed next time.