Static local variables are initialised on the first function call:
Variables declared at block scope with the specifier static have static storage duratio
You are conceptually correct of course, but contemporary architectures can deal with this.
A modern compiler and architecture would arrange the pipeline such that the already-initialised branch was assumed. The overhead of initialisation would therefore incur an extra pipeline dump, that's all.
If you're in any doubt, check the assembly.