From owner-freebsd-questions@FreeBSD.ORG Mon Feb 26 02:47:49 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0037916A403 for ; Mon, 26 Feb 2007 02:47:48 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.freebsd.org (Postfix) with ESMTP id CA27F13C478 for ; Mon, 26 Feb 2007 02:47:48 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from localhost (localhost [127.0.0.1]) by pi.codefab.com (Postfix) with ESMTP id 307136102; Sun, 25 Feb 2007 21:47:48 -0500 (EST) X-Virus-Scanned: amavisd-new at codefab.com Received: from pi.codefab.com ([127.0.0.1]) by localhost (pi.codefab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9W5BY2lxJhqp; Sun, 25 Feb 2007 21:47:45 -0500 (EST) Received: from [192.168.1.251] (pool-68-161-114-230.ny325.east.verizon.net [68.161.114.230]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pi.codefab.com (Postfix) with ESMTP id 8197A5EC8; Sun, 25 Feb 2007 21:47:45 -0500 (EST) Message-ID: <45E24A50.6030405@mac.com> Date: Sun, 25 Feb 2007 21:47:44 -0500 From: Chuck Swiger User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: deeptech71@gmail.com References: <45E218CC.7060902@gmail.com> In-Reply-To: <45E218CC.7060902@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: compiling always generates fast code? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2007 02:47:49 -0000 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