> > When was a C++ program slower than the equivalent C
> > program? I don't think there was ever such a case.
>
> It definitelly was, at least with some compilers. For
> instance, read some discussions on rewriting Linux kernel
> in C++ (not that L. Torvalds knows anything about C++, but
> he complained that even the C code compiled with g++ was
> slower):
http://www.kernel.org/pub/linux/docs/lkml/#s15-3It does not say anything, really, just a vague reference to gcc being slower in C++ than in C. Which says nothing. And it does not talk about 'equivalent programs'.
>
>
> > I think the definition of the O/S is not the
> applications
> > distributed with it but its kernel and drivers. And I
> > think all of NT is written in C, even in these days.
>
> Most definitions of "Operating System" include kernel +
> various user-space systems (think "GNU/Linux"). NT kernel
> is written with C, but everything else (shell, DirectX,
> COM, ...) is C++.
All these are programs on top of the kernel, so they are not part of the O/S, they are part of the O/S distribution. There is a difference.