lkml.org 
[lkml]   [2006]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Compiling C++ modules
Alexander Shishckin wrote:
> On 4/26/06, Avi Kivity <avi@argo.co.il> wrote:
>
>> Not in this case. The constructor is an assignment. The destructor is an
>> if () followed by a delete. In this case, the if () is optimized away so
>> you are left with less generated code than the C case, for the
>> non-exceptional path.
>>
> Relying on compiler optimisations is just as well stupid as hunting
> trialing writespaces in a dark room miles away.
>

It'd like to see the output of 'size vmlinux' with optimizations turned
off. The kernel is full of forwarding functions and constructs that
optimize away to nothing.

Last time I tried, the kernel wouldn't even compile at -O0, but that may
have changed with the always_inline work.

And it is *not relying* on compiler optimizations that is stupid. It
means you're throwing away the work of the compiler folk, and doing it
instead *by hand* at every piece of code you write.

> It's almost about time to quit this thread and show us some code that
> works. (Forked from 2.6.16, bootable on an average amount of
> architectures...)
>

Ha ha.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

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

\
 
 \ /
  Last update: 2006-04-26 06:43    [W:6.468 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site