Re: Compiling C++ modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexander Shishckin wrote:
On 4/26/06, Avi Kivity <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux