Messages in this thread | | | Date | Wed, 26 Apr 2006 07:39:00 +0300 | From | Avi Kivity <> | Subject | Re: 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/
| |