[lkml]   [2000]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux kernel modules development in C++
** Reply to message from Horst von Brand <> 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 -
Interactive Silicon -

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
Please read the FAQ at

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