lkml.org 
[lkml]   [2002]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: keep code simple
From
Date

>> A bit offtopic, but: I heard M$ and Intel compilers beat GCC
>> by 20-40% in terms of code size. Why GCC is so much behind?
>>
> er...

> one big reason is that gcc is cross platform, while
> ms and intel can cut corners and optimize for x86

That and most of gcc's optimizations are done at the RTL level, which
is just a glorified assembler. IIRC the original GCC optimizer was
based on the U of Arizona optimizer which was just an assembly
optimizer. Consequently higher lever optimizations, which every
serious compiler (but gcc) do, are unbeknownst to gcc.

If you lower the high level code too much (like gcc does), you loose
certain abstractions such as loops, that could benefit enormously from
high lever optimizations.

Diego Novillo is doing a lot of infrastructure work for gcc so we can
do these high level optimizations, but that's a bit far in the
horizon.

Cheers.

Aldy
-
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:22    [W:0.069 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site