If the function is not very small (therefore, it turns the other way), using a DLL does not have any difference in performance (except that loading a DLL increases the startup time of your application.) Large, critical applications use DLLs (for example, Intel Math library) . There are minor penalties if the compiler cannot optimize the entire program, but these are very small differences that usually do not matter.
Regarding static / dynamic: I assume that it means you can link the DLL in the usual way (using the import library), which forces it to always load or load it dynamically at runtime (using LoadLibrary
and dlopen
.) There is no difference in performance, but using LoadLibrary
allows you to delay loading the library to the actual level.
source share