Which is faster in C++: compiling altogether, or linking to shared or static library?
<p>There are several discussions on forums about shared vs. static libraries regarding performance. But how do those approaches compare to compiling the code altogether?</p>

<p>In my case, I have a class (the <i>evaluation code</i>) that contains a few methods that contain several <code>for</code> loops and that will be called several times by a method from another class (the <i>evaluator code</i>). I have not finished implementing and testing everything yet. But, for the sake of performance, I am wondering if I should compile all the files altogether (compiler optimization advantages?), or compile some files separately to generate static or shared libraries.</p>