Ethereal-dev: Re: [Ethereal-dev] packet-parlay.c takes a very long time to compile in Fedora C

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Jeff Morriss <jeff.morriss@xxxxxxxxxxx>
Date: Sun, 23 Apr 2006 14:23:10 +0800

Guy Harris wrote:
Jeff Morriss wrote:

Has anyone else noticed that packet-parlay.c (in plugins/giop/) takes a _very_ long time to compile? I recently upgraded from Fedora Core 4 to Fedora Core 5 and now it takes around 10 minutes to compile it (on my 1.6 GHz Pentium 4); I seriously thought the compiler was hung it was taking so long...

Of course I have no clue how long it used to take and I don't have an (easy) way to test this on other versions or platforms at the moment--is anyone else seeing anything like this?

Not quite that bad, but it does take a significant amount of time to compile on OS X 10.4.6 (1.5 GHz PPC G4). (Did the FC4 -> FC5 upgrade either GCC or the GCC options? The compiler might be doing more aggressive optimization.)

It looks like I (should have had) gcc 4.0.2 (+ whatever Redhat patches) and now I have 4.1.0 .

http://gcc.gnu.org/gcc-4.1/changes.html

has a rather large section on optimization improvements, so I suspect that may be the difference...

I don't particularly feel like struggling with downgrading my compiler, but here are various compile times using gcc-4.1 on my system:

Without optimization:

real    0m17.812s
user    0m16.125s
sys     0m0.836s

-O1:

real    8m28.577s
user    8m12.139s
sys     0m1.852s

-O2:

real    9m50.071s
user    9m39.720s
sys     0m2.604s

-O3:

real    2m43.235s
user    2m31.161s
sys     0m3.008s


I'm a little shocked by the jump from -O0 to -O1 and am puzzled by the -O3 result. I guess one of the (new?) optimizations is left out in -O3? Seems odd...