On 17/09/11 8:59 PM, Vladimir Panteleev wrote:
On Sat, 17 Sep 2011 20:55:38 +0300, Peter Alexander
<peter.alexander...@gmail.com> wrote:
And I'm sure you know what unity builds are. For those that don't:
http://buffered.io/2007/12/10/the-magic-of-unity-builds/
I've always wondered if the overhead that unity builds are supposed to
reduce was mainly because of all the build tools which force the OS to
flush intermediate files to disk. Has anyone compared the performance
advantages of using unity builds versus building everything on a RAM drive?
I have no idea if anyone has done that comparison.
That's certainly not the only advantage though. If you went with the
single unity file approach then it means that each header needs to only
be parsed once. It also means that unique template instantiations are
only emitted once, making things easier for the linker. I once measured
that it takes GCC 30ms on my laptop to emit an std::sort of an int array.