X-pop3-spooler: POP3MAIL 2.1.0 b 4 980420 -bs- Message-Id: <3.0.32.19980717065813.0098dc00@xs4all.nl> X-Sender: diep AT xs4all DOT nl X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Fri, 17 Jul 1998 06:58:16 +0100 To: nuke AT bayside DOT net From: Vincent Diepeveen Subject: Re: PGCC's optimizations (continued) Cc: Misha , beastium-list AT Desk DOT nl Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: Marc Lehmann Status: RO X-Status: A Content-Length: 4261 Lines: 93 At 07:12 AM 7/18/98 -0400, nuke AT bayside DOT net wrote: >On Thu, 16 Jul 1998, Vincent Diepeveen wrote: > >> At 10:22 AM 7/16/98 +0300, Misha wrote: >> >Hi. >> > First, thanks to Marc and others who have responded promptly and >> >informatively to my questions. >> > >> >Recap: Sometime ago I posted that PGCC does not optimize PII(PPro) >> >code that good. I said that GCC 2.7.2.1(libc5) produced better code for >> >my number-crunching app. >> > >> >Now to the point. I did all what you have adivised me to do (compiler >> >flags). Only after adding "-march=pentiumpro", the code gained about >> >23% (the integer only version), and now it is slightly (1.1%) better than >> >GCC 2.7.2.1 produced code. >> > >> >When I used the float version none of the flags you've sent me gained >> >anything. >> > >> >I am not dissapointed with PGCC, but I think some more work has to be >> >done in order to gain the full potential of the P6 (PII+PPro) architecture. >> >> that's clear, but also true for all other compilers. >> >> >BTW, has anyone ever done a comparison of the same code under PGCC >> >and DOS/Win95 compilers (VC++ 5.0, Watcom C/C++, Symantec, Borland, >> >Metaware, etc...)? >> >> Yes Watcom is very fast for DOS applications and optimizes best at >> pentium. PGCC is at the same level like watcom, and gcc follows with a big >> gap. Borland is for optimizing laughable. For programming features >> it's at no #1 though. Nothing as easy as making interface for windoze >> with borland products like builder. >> >> For windows NT/95/98 however there is only 1 number 1 and that's msvc. >> Nothing comes near msvc++ speed. Too bad. Not only win98 seems >> to get the world at its feet (even the most stupid computeruser can >> install win98), but also you compile with a compiler from that company >> to speeds no other compiler can manage. At least 10% speed diff with >> MSVC and gcc. that's in fact not much, but the new msvc++ 6.0 which is >> in beta is 20% faster than 5.0, so you guys have a lot of work to do! > >you must understand that msvc is for microsoft windows ONLY. since it's for >alpha and x86 ONLY (matter of fact, i'd be willing to bet that 20% increase is >due to removal of alpha support - NT 5.0 will likely be x86 only) and so it >doesn't need to do any weird hacks for every which architecture that gcc >supports. it's perfectly ok for the msvc++ people to stick x86 assembly code >all over the place and assume exactly what's in the system, because if your >system is weird enough to break the compiler, windows 95/98/NT wouldn't have >installed on it. > >make no assumptions. a very large part of gcc is its platform independantness. >if you were to make gcc say, a compiler for FreeBSD/x86 *ONLY*, cut out any >code that platform doesn't use, do no checking for headers/libraries >because you know exactly what it has, you'd make a very tiny and probably >a much faster compiler. > >> About latest version pgcc: I tried installing the 'new' >> PGCC quite a number of times, but so far >> didn't manage under Linux. It can't work with 2.8.1 header files >> for some reason. I'll try it tonight again. >> >> >I had some difficulties porting my own code but I am working on it now. As >> >soon as I have results I will post them here. >> >> Porting from (p)gcc to msvc/watcom is hard because msvc/watcom are horrible >> in casting. You must cast everything. > >which is another thing. those compilers don't do any intelligent variable >checking to see if you absolutely need a cast or not. while you're making your >single-platform single-os gcc, go ahead and take out all the checks it does to >see wether a cast is needed or not. variables of different types should ALWAYS >have a cast. this would probably be a pretty big increase in compile speed. > _ _ __ __ _ _ _ >| / |/ /_ __/ /_____ | Nuke Skyjumper | >| / / // / '_/ -_) | "Master of the Farce" | >|_ /_/|_/\_,_/_/\_\\__/ _|_ nuke AT bayside DOT net _| > Nuke, 1 big note: i'm not interested in HOW long it takes to compile stuff, nor did i compare executable size. I'm only interested in how fast my program is. Vincent >