lkml.org 
[lkml]   [2000]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux kernel modules development in C++
** Reply to message from Horst von Brand <vonbrand@inf.utfsm.cl> on Thu, 28 Sep
2000 16:44:55 -0400


> Right. And C++ was designed carefully along "you pay for what you use", so
> with careful programming it should be no worse. OTOH, in C you _see_ the
> costs [OK, maybe a hardened asm-fanatic will take issue with that...], in
> C++ you don't necessarily see what is going on.

I don't agree with that at all. C is not better or worse than C++ in this
regard. The only way to truly know what you get is to examine the generated
assembly code. When I do this, more often than not I'm surprised at how the
compiler interpreted my code, or what code the compiler generated. The only
time my C++ compiler generated code that I was wildly less efficient than I
expected was when I created an lookup table of member functions. I had to
rewrite the code to use a switch/case statement instead.



--
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com

When replying to a mailing-list message, please don't cc: me, because then I'll just get two copies of the same message.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:39    [W:0.107 / U:2.264 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site