lkml.org 
[lkml]   [2003]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Kernel 2.6 size increase - get_current()?
Miles Bader wrote:
> Hollis Blanchard <hollisb@us.ibm.com> writes:
>
>>Inlines don't always help performance (depending on cache sizes, branch
>>penalties, frequency of code access...), but they do always increase
>>code size.
>
>
> Um, inlining can often _decrease_ code size because it gives the
> compiler substantial new opportunities for optimization (the function
> body is no longer opaque, so the compiler has a lot more info, and any
> optimizations done on the inlined body can be context-specific).
>

starting from -O3 gcc do always trys to do inlining.
was observed on gcc 3.2 and I beleive I saw the same 2.95.3

compile this test with 02 & 03:
-------------------
#include <stdio.h>

int aaa() { return 32; }

int main() {
int b = aaa();
printf("hello %d \n", b);
return 0;
}
------------------

and then objdump -d to see the difference between main()s: 02 - you
will see function call, 03 - you will see just raw number 0x20 used.

-
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: 2005-03-22 13:47    [W:0.140 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site