Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / February 2005



Tip: Looking for answers? Try searching our database.

GCC vs CodeWarrior - performance?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Northern Lights Info - 21 Feb 2005 16:28 GMT
Has anyone done a side-by-side performance test on the code created by the
two compilers?  I've heard that GCC's code isn't as optimized as CW's.

Blair M. Burtan
Northern Lights Productions
http://www.northernlights3D.com
Howard Hinnant - 21 Feb 2005 20:24 GMT
> Has anyone done a side-by-side performance test on the code created by the
> two compilers?  I've heard that GCC's code isn't as optimized as CW's.
>
> Blair M. Burtan
> Northern Lights Productions
> http://www.northernlights3D.com

If anyone does, you might want to include std::lib performance too
(check out inserting into vector<string> for example, or maybe
vector<map<string, string> > ;-)).

-Howard
toby - 22 Feb 2005 02:28 GMT
> Has anyone done a side-by-side performance test on the code created by the
> two compilers?  I've heard that GCC's code isn't as optimized as CW's.

I'd be happy to run some benchmarks for you, but my "hello, world"
Mach-O CW8 project doesn't build:
   Error   : Internal Mach-O Importer Error File 'ImportMachO.c' Line
2028 unsupported unknown reloc type 13 (hunk_type = 65535)

MachO Import PPC: 3.0.3 Build 0343
O/S: 10.3.7

--Toby

> Blair M. Burtan
> Northern Lights Productions
> http://www.northernlights3D.com
David Phillip Oster - 22 Feb 2005 05:04 GMT
> I'd be happy to run some benchmarks for you, but my "hello, world"
> Mach-O CW8 project doesn't build:
[quoted text clipped - 5 lines]
>
> --Toby

You forgot to replace the crt1.o from the stationery with mwcrt1.o
(search for it in the Metrowerks folder) this is something that Apple
changed after 8 shipped.

Remember, after adding mwcrt1.o t you project, to move it to the top of
the "link order" panel.

Signature

David Phillip Oster

toby - 22 Feb 2005 17:33 GMT
> > I'd be happy to run some benchmarks for you, but my "hello, world"
> > Mach-O CW8 project doesn't build:
[quoted text clipped - 8 lines]
> You forgot to replace the crt1.o from the stationery with mwcrt1.o
> (search for it in the Metrowerks folder) this is something that Apple

> changed after 8 shipped.

Thanks for the tip, that worked perfectly.
--Toby

> Remember, after adding mwcrt1.o t you project, to move it to the top of
> the "link order" panel.
toby - 22 Feb 2005 18:39 GMT
> Has anyone done a side-by-side performance test on the code created by the
> two compilers?  I've heard that GCC's code isn't as optimized as CW's.

It undoubtedly depends on the details of what you're doing.

How quick and dirty a comparison would you like? On my favourite
*integer* benchmark (Fhourstones,
http://www.cwi.nl/~tromp/c4/fhour.html), on a typical run*, code built
by gcc 3.3 at -O2 runs around 20% faster than CW8 build at opt 4. Both
targeting generic PPC.
The other PPC contender, MPW's mrc (-opt speed), outperforms them both
on this benchmark; its build runs around 35% faster than the CW8 build.
That's one reason I build all my plugins with it (PEF, Carbon/Classic
runtimes).

Typical Fhourstones run (higher is better), 1.25GHz G4
gcc -O2 = 672.8 Kpos/sec
cw8 -O4 = 561.8 Kpos/sec
mrc -opt speed = 756.2 Kpos/sec (under MPW/Classic no less)

--Toby
Free Photoshop compatible plugins @ http://www.telegraphics.com.au/sw/

*c4 benchmark parameters:
-DTRANSIZE=1050011 -DPROBES=8 -DREPORTPLY=8
input = 444333377

> Blair M. Burtan
> Northern Lights Productions
> http://www.northernlights3D.com
toby - 22 Feb 2005 22:02 GMT
> ... my favourite
> *integer* benchmark (Fhourstones,
> http://www.cwi.nl/~tromp/c4/fhour.html), on a typical run*,

I should clarify, the code I was using is Fhourstones *2.0*, for which
the correct URL is http://homepages.cwi.nl/~tromp/c4/fhour2.html

> --Toby
> Free Photoshop compatible plugins @ http://www.telegraphics.com.au/sw/
Brad Oliver - 22 Feb 2005 20:59 GMT
> Has anyone done a side-by-side performance test on the code created by the
> two compilers?  I've heard that GCC's code isn't as optimized as CW's.

I did a build of a game port in XCode and compared performance to CW
9.3. The end result was that the CW build was just a fraction faster in
terms of raw frames-per-second. We're talking ~0.5 fps out of ~20 on
average, probably within the margin of error.

This game was a light user of the STL, fwiw.

Signature

Brad Oliver
bradman@pobox.com.AM_SPAY

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.