compilers nowadays often do call specialization for constants arguments -
basically create alternate functions for specific constant values based on
metrics collected during the compile, instead of doing it blindly, meaning that
static ends up being a noisy premature optimization if used for this reason.
the story is similar to inline in c \- obsoleted by better compilers,
effectively.
this will work better if you also enable LTO - which incidentally removes the
need for the nim {.inline.} noise in your code too.