[cfe-dev] [RFC] Embedding compilation database info in object files.

Karen Shaeffer shaeffer at neuralscape.com
Fri Jul 19 20:26:31 PDT 2013


On Fri, Jul 19, 2013 at 02:14:05AM -0700, Chandler Carruth wrote:
> On Fri, Jul 19, 2013 at 2:08 AM, David Chisnall <David.Chisnall at cl.cam.ac.uk
> > wrote:
> 
> > On 19 Jul 2013, at 10:01, Chandler Carruth <chandlerc at google.com> wrote:
> >
> > > There is no need to have it be a separate process at all. Just start a
> > background thread and join it before terminating.
> >
> > Have you benchmarked the difference between clang with and without
> > pthreads linked in?  A lot of libc and STL things become more expensive
> > (including malloc(), although not by much) when pthreads are linked, even
> > if they're not used.
> 
> 
> Yes, I have, and on my systems none of these things are true. I don't know
> whether or why they are true for you, but I don't think it should guide the
> decision of how to architect the Clang driver.

Hi Chandler,

I am presuming you did your testing on linux systems. While it is surely possible
to mess up threaded performance in the thread library, I believe thread performance is
typically dominated by the operating system coupled with a hardware platform. Some operating
systems scale much better than others. And you'll find considerable variance depending
on the extent of the scaling. You might not see the same performance on other systems
in a scaled environment. I've done such performance testing on numerous OS's running a
complex Java application stack, and it was shocking how poorly some of those OSs performed
compared to Linux, all running the same application stack on the same hardware.

I guess the take away is once you go down the threaded scaling path, your performance
is likely to diverge on different operating systems. YMMV.

enjoy,
Karen
-- 
Karen Shaeffer
Neuralscape, Mountain View, CA 94040



More information about the cfe-dev mailing list