Referencing a static local variable in a procedure is two to three times slower than a regular local, dynamic variable. If your procedure demands every last bit of speed possible, convert all static variables into module-level variables.
However, this approach has a nasty design implication?the procedure becomes less self-contained. You must remember to copy and paste the module-level variable when you reuse the procedure in another project. But this approach might make sense in an extremely intense routine. Further, referencing a variable declared at module level is faster than referencing a global variable declared in a separate BAS module. If you don’t need to share a variable among all of an app’s forms and modules, you should declare it in the only form or module that uses it.