From owner-freebsd-hackers Mon Jun 5 18:42: 9 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 146B437B8AD for ; Mon, 5 Jun 2000 18:42:06 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id SAA89210; Mon, 5 Jun 2000 18:42:01 -0700 (PDT) (envelope-from dillon) Date: Mon, 5 Jun 2000 18:42:01 -0700 (PDT) From: Matthew Dillon Message-Id: <200006060142.SAA89210@apollo.backplane.com> To: Anatoly Vorobey Cc: "Daniel C. Sobral" , hackers@FreeBSD.ORG Subject: Re: Optimization References: <20000606031706.A41154@happy.checkpoint.com> <200006060031.JAA00841@daniel.sobral> <20000606035948.A41527@happy.checkpoint.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG cc -S -O2 x.c struct u { short a; short b; }; struct u table[256]; void fubar(int i) { register struct u value = table[i]; fubar2(value.a, value.b); } But, as I said, spending all your time trying to optimize out a few 5 nS instructions here and there is a supreme waste of time. It will lull you into a false sense of performance and cause you to miss more obvious performance issues. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message