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 / November 2005



Tip: Looking for answers? Try searching our database.

CW 10 building larger Mach-O binary

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
larry@skytag.com - 08 Nov 2005 04:17 GMT
I'm just curious, but my Mach-O binary is about 400K (about 9%) larger
when built with CW 10 than when built with CW 9, both with
optimizations off. Any ideas why that would be? Thanks,

Larry
Ron L - 08 Nov 2005 18:10 GMT
>I'm just curious, but my Mach-O binary is about 400K (about 9%) larger
>when built with CW 10 than when built with CW 9, both with
>optimizations off. Any ideas why that would be? Thanks,

More inlining,  look at the global optimizations are they set for size
or speed?  if Speed then it inlines deeper.

Ron

Signature

CodeWarrior Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and our staff
       --   http://www.codewarrior.com/community  --

Ron Liechty - ron.liechty@freescale.com - http://www.codewarrior.com

larry@skytag.com - 08 Nov 2005 20:33 GMT
That doesn't explain it based on the following:

CW 9 Faster Execution Speed: 5.28 MB
CW 10 Smaller Code Size: 5.59 MB
CW 10 Faster Execution Speed: 5.68 MB

These numbers are for my debug build, so all optimizations are off.

Smaller code size in 10 is still 300K larger than faster execution in
9. I'm not complaining, I'd just like to know what benefits my users
will get from downloading a larger disk image. :-)

In general I'd like to know what benefits CW 10 offers besides working
in Tiger without having to fiddle with headers and such, and I'd prefer
a description that could be understood by someone who doesn't
understand what CW is doing under the hood. Kind of a semi-layman
explanation. Is there such a description around somewhere?

Larry
Ron L - 09 Nov 2005 00:32 GMT
>That doesn't explain it based on the following:
>
[quoted text clipped - 3 lines]
>
>These numbers are for my debug build, so all optimizations are off.

I don't know why it is larger, is this C++ or C,  are you sure all
optimizations are off in both of them, IPO may be on for the CW 10 one.

>In general I'd like to know what benefits CW 10 offers besides working
>in Tiger without having to fiddle with headers and such, and I'd prefer
>a description that could be understood by someone who doesn't
>understand what CW is doing under the hood. Kind of a semi-layman
>explanation. Is there such a description around somewhere?

Not that I know of without getting into Marketing Speak which I know you
want to avoid.

Ron

Signature

CodeWarrior Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and our staff
       --   http://www.codewarrior.com/community  --

Ron Liechty - ron.liechty@freescale.com - http://www.codewarrior.com

larry@skytag.com - 09 Nov 2005 05:55 GMT
What is IPO?

Larry
Ron L - 09 Nov 2005 19:23 GMT
>What is IPO?

Initial Price Offering... I meant IPA

Look in the Release Notes/compiler notes/CW C-C++ Notes 4.0.txt

*  Interprocedural Analysis Support

  Interprocedural Analysis (IPA) allows the compiler to generate better
  and/or smaller code by inspecting more than just one function or data
  object at the same time. This technology is currently mostly used by
the
  inliner and a new optimization that tries to reduce the size of C++
  exception handling code and data. It also allows cross file string
merging
  (reuse strings) and pooling. The optimizer and code generators will
start
  using this in future releases for more optimizations.

Ron

Signature

CodeWarrior Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and our staff
       --   http://www.codewarrior.com/community  --

Ron Liechty - ron.liechty@freescale.com - http://www.codewarrior.com

larry@skytag.com - 10 Nov 2005 05:08 GMT
>From what you quote here it sounds like IPA should result in smaller
code, not larger. Do you have a reason to believe IPA is behind the
increase in size or is this just a guess?

Larry
Ron L - 10 Nov 2005 16:08 GMT
>>From what you quote here it sounds like IPA should result in smaller
>code, not larger. Do you have a reason to believe IPA is behind the
>increase in size or is this just a guess?

Neither,  it was just something to look at. You might have it off in the
CW 10 code taking it out of the equation.  Without the code it is pretty
hard to tell what or where the size difference is.  I think you will
need to generate a map file for each to look at them.  This basically is
a how much this affects you and how curious you are matter.  

It could be something with weak import, maybe we have something with
this including extra code now that we didn't have with previous version.
I can suggest things to look at but they are neither guesses or beliefs.
This could only be by looking at the map file.

Ron

Signature

CodeWarrior Community Forum is a free online resource for developers
to discuss CodeWarrior topics with other users and our staff
       --   http://www.codewarrior.com/community  --

Ron Liechty - ron.liechty@freescale.com - http://www.codewarrior.com

larry@skytag.com - 14 Nov 2005 02:02 GMT
IPA was off. I turned it on and this is what I get:

CW9                 4.98 MB
CW10 with IPA         3.73 MB
CW10 without IPA      5.35 MB

So IPA makes a big difference in the final size. The Code and Data
columns in the project window are interesting, though. They both show 0
for every file except one, which has the full non-library totals.

Larry
 
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.