(object oriented programming
Also known as early binding, and the opposite of dynamic binding (or late binding).
Suppose you have a method call that's not polymorphic. In C++, these can take forms such as
anX.meth(args...) (where we've declared
X anX) or
x is not a pointer to a polymorphic base class. (I'll be using C++ for the examples, because it has both types of binding and is reasonably well-known). At compile time, the compiler can figure out precisely which method
meth() to call: it has to be
X::meth() (or the method
X itself inherits from somewhere, which is information available to the compiler).
In this situation, the compiler can generate code that calls the correct method. It's even safe to inline the function call.
Static binding is generally much faster (at run time) than dynamic binding -- the machine just performs a regular function call. The difference is especially great for very short routines, of course.
Unfortunately, a good deal of object oriented programming requires polymorphism. And polymorphism cannot be done without at least some dynamic binding.