[nycbug-talk] Re: talk Digest, Vol 14, Issue 9

Bob Ippolito bob
Thu Jan 13 19:38:35 EST 2005

On Jan 13, 2005, at 18:46, Pete Wright wrote:

> (sorry if this is a duplicate reply...despite my ability to offer 
> advice
> seems that still have problems sending email ;)
>> Thanks for the tip pete, I have struggle with idea of which is better,
>> building from ports or pkg_add. I just think that when I build from
>> ports the program should work faster, although I have not been able to
>> prove that. I have pretty much given up on the g4u.
> i was talking to a developer a while back (who was actually preparing a
> lecture on compiler optimisation) about this same topic.  I forwarded 
> the
> idea that one of the benefits of hand compiling software is that it 
> will
> run faster...seeing as how it's been built on my specific CPU/etc.  He
> responded that as long as the maintainer builds a package with sensable
> optimisation flags the benefits are really slim to nill.

Processor specific optimizations require processor specific 
optimization flags.  The benefits should be exactly nil unless the port 
system decides to set CFLAGS to something exotic (I think gentoo may do 
this).  The added bonus is that some compiler optimizations can break 
certain kinds of software in very hard to diagnose ways, where if you 
stick with the default or developer-provided optimization flags, you're 
safer (because they're extremely well tested with the software and with 
GCC, and because they're less likely to be dangerous).

>> I would love to have the same flexibility with FreeBSD. Because even
>> with pkg_add perfecting FreeBSD for desktop use is quite time
>> consuming. Not to mention configuring a custom Kernel and building
>> world.
>> I would like to hear how others have managed to accomplish this.
> sure it may take a little time, altho when it comes down to it it 
> should
> not take too long to build a kernel for example.  I have a dual pIII
> server that can build a kernel in several min's.  If you have a SMP 
> system
> try using a command similar to this (assuming that no others are using 
> the
> box!!):
> # make -j5 buildworld KERNCONF=MY_KERNEL
> this will launch 5 make jobs, which will speed up some of the make 
> tasks.

Typically it's recommended to use -jN where N is the number of 
processors you actually have.  For values of N greater than the number 
of CPUs you have, it should actually go slower...  I would think that 
-j5 is slower than -j4 on a dual CPU system (though -j3 or -j4 might be 
a little faster than -j2 for some kinds of source, -j2 is always faster 
than -j1 on a dual processor system).


More information about the talk mailing list