title: Is static linking slower than local code
body: <p>I am writing some statistical software (C++) where speed is the top priority; second to that is maintainability. </p>
  
  <p>Separately, I have written a static library which bundles together a collection of algorithms that I use routinely. Many of my programs use this library, so maintaining these algorithms independently works perfectly for me. The new statistical software uses this library as well.</p>
  
  <p>While debugging the new software, I commented out a few calls to some simple (computationally-speaking) functions from the library. The speed increase which resulted from omitting the calls seemed disproportionate - raising this question:</p>
  
  <p><strong>Q.</strong> Are there execution time penalties associated with calling statically linked code, beyond those which would result from compiling the same code locally?</p>
  
  <p><em>Note - this is tough to search for. All of my internet searches resulted in comparisons of static versus dynamic links - which doesn't pertain.</em></p>
  
  <p><em>Edit - tests were conducted in Release build (not debug).</em></p>