[rescue] Perverse Question

Dave McGuire mcguire at neurotica.com
Sun Jun 15 10:54:28 CDT 2003


On Sunday, June 15, 2003, at 07:21 AM, Francisco Javier Mesa-Martinez 
wrote:
>> Actually, do you have benchmarks of that? In 3 years of using linux 
>> [1] I've
>> become sceptical about every sort of fud (no offense here).
>
> RTFM, you have been using linux on a X86 machine I suppose. GCC is 
> mostly
> X86 optimized, RISC versions of GCC are notoriously bad when compared 
> to
> vendor specific offerings.

   Absolutely.  Thanks for beating me to this.  I've nothing against 
actually looking up and presenting references in situations like this, 
but it's a real pain when the issue in question has been considered 
common knowledge by pretty much everyone (even the GCC people) for many 
years.

   It's amusing that, nowadays, any statement against anything even 
remotely Linux- or GNU-related is somehow automatically "FUD".

   But, as far as benchmarks...I recently revamped my video security 
system to be compilable with Sun's C compiler.  Tracing a frame through 
the image processing code compiled with GCC takes about 200ms, while 
tracing the same frame through the same code compiled with Sun's C 
takes about 135ms.  That's a pretty damn big difference.  The code is 
heavily hand-optimized (some manual loop unrolling, cache-friendly 
array traversals, etc) so this is just what *additional* optimizations 
can be wrung out of it by the compilers.  The code uses VIS 
instructions via Sun's MediaLib libraries, and the development platform 
is an E450 (quad 300, big caches) and the target platform is Netra X1 
(single 400, tiny cache).

>  Then again, this is just another proof that you get what you pay for.

   This, however, does not hold.  The cardinal rule in the Sun world 
before SPARC processors hit the streets was "use GCC if you want any 
level of performance".  A company I worked for at the time even spent a 
good deal of effort trying to recompile SunOS4 kernel itself with GCC 
(which sadly didn't work out).  Sun's 68K code generation was the pits, 
and GCC's was (and is) very good.

   Same with VAX, by the way, though DEC's compilers are pretty good.  
I'd never have tried it if it weren't for a recommendation in the X11 
(R3 I think) sources, which I spotted *after* compiling all of X on a 
MicroVAX-II with 9MB of RAM (took like two days)...I bit the bullet and 
recompiled it with GCC, and it ran easily twice as fast.  I was 
impressed.

   (not really intending to defend GCC here, I have my own issues with 
it...just pointing out the facts as far as price/performance)

> Also the ratio of x86 gcc developers to other architectures is like 
> 100:1,
> so of course the x86 will have better cisc intel support.

   Well, I think it's more that those folks seem to think x86 is the 
end-all, be-all of architectures.  What's scary is that some of them 
actually *know something* about processor architecture, and as such, 
should know better.  Maybe they just haven't looked at anything modern.

> To give credit where credit is due, it is a fantastic achievement to 
> have
> a free compiler set that supports so many architectures. So even if it
> ain't optimal, I salute them for offering tools for free to the masses 
> :).
> Also I asusme that the tradeoffs between designing a portable framework
> and trying to also optimize it must be a complete nightmare...

   Agreed 100%.

      -Dave

--
Dave McGuire             "I've grown hair again, just
St. Petersburg, FL           for the occasion."       -Doc Shipley



More information about the rescue mailing list