Optimize code

Jeremy Byron rjjbyron at shaw.ca
Wed May 10 04:14:33 PDT 2006


Ioan Ionita wrote:
><snp> 
> OT kinda..
> That's a gain of over 300%, quite a lot. I would understand reducing
> the build time in almost half by using both cores of the FX-60, but
> your reduction is a lot bigger.  Using 3 threads on 2 cores would also
> incur additional scheduling overhead, so there should be an increase
> in system time. RAM shouldn't really make that much of a difference
> between 700 megs or however much is addressable without high mem and

I kinda thought so too.  But, unless I did the math wrong, that's what
the logs say.

> 2GB. Are you sure those times are accurate? Did you run the same test
> suites every time? Where's the extra 200% coming from?

All I did was take the unit SBU time, multiply by the total SBUs and
divide by 3600s.  Pretty sure the test/optimize levels were the same
(and the optimizations don't make much difference anyhow).  Now, I'm not
sure if that is an accurate representation of the actual build time (I'm
always afk) but I used the same method for both results.

I just built binutils by itself within 'time ( )' and got more along the
lines of what you would expect.  But note that the non-j3 build is ~140s
quicker than my previous build logs for some reason (surely the make
install isn't that time consuming).  So if not the highmem fix, then I
don't know what.

028-binutils with the 'make install' stripped and optimized (no j3):
  1) real  103.925s
  2) real  101.839s
028-binutils with the 'make install' stripped and optimized (with j3):
  1) real  57.906s,
  2) real  56.046s

Maybe the unit SBU time was just gimped before?  They were ~245s without
-j3.  Was there a change in SBU calculations between jhalfs-2639 and the
more recent versions?  Hmm.. also possible I used a different SVN book;
changed much in the last 5 days?

Forgot to save the -j3 build log.. :|
I'll build again and see what I get.. pretty sure it was 55s unit time
and 95ish total SBUs though.

In any case, "-j3" is definitely a welcome improvement.

Regards,
Jeremy.



More information about the alfs-discuss mailing list