Tony Peden wrote:
> Jon S. Berndt wrote:
> > With optimization turned on as described above I got a build time (total
> > rebuild) of 3 minutes 30 seconds. So, in my case it didn't quite double.
> >
> > Thanks for the heads-up.
> >
> > Tony, what do you see on your machine?
>
>
> [tony@raptor ~/JSBSim-CVS/JSBSim]$ make clean
> ...
> [tony@raptor ~/JSBSim-CVS/JSBSim]$ time make
> c++ -DHAVE_CONFIG_H -I. -I. -I. -I. -Wall -O2 -c FGAerodynamics.cpp
> ...
>
> real 2m35.012s
> user 2m20.090s
> sys 0m5.050s
>
> g++ 2.95.4
>
> I usually build with -O2, BTW.
I've been toying with this stuff a little more. First off, my machine
configuration.
950 Mhz Slot-A Athlon (This is the pre-thunderbird core, with the
really slow off-die L2 cache running at 333 MHz)
1GB PC-100 RAM (I found a really great deal on slightly, er, off-spec
"PC133" memory. It runs flawlessly at 100MHz, hangs
hard at 133. A pity. Still, $90 for a gig of memory
is nothing to sneeze at -- I turned off my swap
partition entirely and never looked back. Virtual
memory is an anachronism for desktop machines.)
Running the builds locally, with nothing else touching the machine, I
complete rebuild of the JSBSim directory from the FlightGear CVS.
These numbers are for gcc 2.96; the ones for 3.0.4 are basically
identical (I was too lazy to rebuild all the libraries just to test
one directory):
-O2:
real
10m19.785s
user
9m53.910s
sys
0m12.130s
-O2 -fno-inline:
real
3m37.231s
user
3m11.820s
sys
0m7.920s
No optimizations:
real
3m12.603s
user
2m39.950s
sys
0m7.580s
I have to back off of the 15 minutes I quoted earlier -- that was
running over NFS, and with other stuff hammering on the same drive.
Still, it's quite clear that inlining is our problem here. The
difference between inlined-but-optimized code and completely
unoptimized code is only 13%, while the inlining takes a 300% (!!!)
hit.
Qualitatively, there doesn't seem to be any difference in performance.
This isn't surprising, of course, since the simulator spends only a
tiny fraction of its time in the FDM.
I'll try running a complete build with -fno-inline and see what the
difference is. If this gets me a 3x speed up in compile times, then
I'll shut up and stop bothering everyone. It's even possible that
this will get us a net runtime speedup too. My guess is that it won't
do anything measurable to runtime performance.
On the subject, does anyone know the Right Way to change
CFLAGS/CXXFLAGS via automake/autoconf? I've just been hacking at the
generated makefiles.
Andy
--
Andrew J. Ross NextBus Information Systems
Senior Software Engineer Emeryville, CA
[EMAIL PROTECTED] http://www.nextbus.com
"Men go crazy in conflagrations. They only get better one by one."
- Sting (misquoted)
_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel