Date: Sun, 25 Feb 2007 21:47:44 -0500 From: Chuck Swiger <cswiger@mac.com> To: deeptech71@gmail.com Cc: freebsd-questions@freebsd.org Subject: Re: compiling always generates fast code? Message-ID: <45E24A50.6030405@mac.com> In-Reply-To: <45E218CC.7060902@gmail.com> References: <45E218CC.7060902@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
deeptech71@gmail.com wrote: > Do you get processor-specific code when you do buildworld and > buildkernel, particularly on a -RELEASE? No, not unless you've configured the kernel Makefile and /etc/make.conf to include processor-specific CFLAGS. See /usr/share/examples/etc/make.conf. > Does building from ports always automatically optimize code (vs packages)? Both ports and packages are optimized at the default level of "-O", unless you set it otherwise. The kernel & world are known to be safe building using: -O2 -fno-strict-aliasing > Do I need to strip some files after the compilation (world, kernel, > ports) to get the absolute maximum performance? > > Any other tips to speed up executables? Sure, benchmark performance and make sure you run any self-testing routines ("make test" or "make check", usually) when you experiment with non-default optimizations. Pay attention to whether you obtain significant gains by using non-default optimizations, because the answer generally varies in different situations and on different CPU types. -- -Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45E24A50.6030405>