lkml.org 
[lkml]   [1999]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: C++ in kernel (was Re: exception in a device driver)
According to Alan Cox:
> So to write optimal C++ I have to know at least as much as the internal
> structure of the code than for C.

Sure. The same machine is under there, whichever language you use;
you always have to know what's going on under the hood if optimal
performance is the goal. None of this is an argument against C++ per
se, particularly if you just choose to use its 'better C' subset.

> C++ is less efficient because the compiler cannot perform some
> optimisations it can in C without help from the code writer.

C++ is *not* less efficient. It can't be, seeing as how it's
almost[*] a proper superset of C, so there's nothing about the C
subset that prevents just-as-good code generation.

[*] modulo added keywords and obscure points like typeof('c').
--
Chip Salzenberg - a.k.a. - <chip@perlsupport.com>
"When do you work?" "Whenever I'm not busy."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [W:0.262 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site