A variable declared with the keyword "static" instead of "new" operates in the same way a global does (it is created only once) but the variable is local to the function; this means the code is much easier to read, while drastically improving speed just like a global variable.
The only thing I am unsure about is if it will act globally since I haven't tested it. It probably will though.