It is a general rule of thumb that statically done operations are much faster than the dynamically done operations. In static operations, the operations are known before compiling, so the compiler can take steps to optimize them, and the general cost of allocating memory during runtime, which is done during the dynamic operations, is skipped.
However, there are some disadvantages to this also, if you want everything to be statically done then you should know the exact requirements of your code before hand, also all the operations should be deterministic. Whereas, the dynamic system gives you the flexibility of deciding things on the fly. Majority of the systems do things dynamically except for some Real time OS where the performance is of critical importance.