spring/spring — comment on commit 30dbf389b2216a9dd4eff83b5553c628ee8e0143
File:  line 0
By zerver:

This commit may be OK, but keep in mind that "static" in a function is nothing more than an implicit if statement, and is therefore absolutely not an universal solution for higher performance.

If you code this:

function() {
static int my_static_var = X;
}

the compiler produces something like this::

static int my_static_var;
bool static_inited = false;
function() {
if(!static_inited) {
my_static_var = X;
static_inited = true;
}
}