From owner-freebsd-hackers Mon Jun 5 17:26:21 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (Postfix) with ESMTP id 9C74E37BE68 for ; Mon, 5 Jun 2000 17:26:17 -0700 (PDT) (envelope-from dcs@newsguy.com) Received: from daniel.sobral (p06-dn01kiryunisiki.gunma.ocn.ne.jp [211.0.245.7]) by peach.ocn.ne.jp (8.9.1a/OCN/) with ESMTP id JAA18633; Tue, 6 Jun 2000 09:26:12 +0900 (JST) Received: (from dcs@localhost) by daniel.sobral (8.9.3/8.9.3) id JAA00822; Tue, 6 Jun 2000 09:27:21 +0900 (JST) (envelope-from dcs) From: "Daniel C. Sobral" Message-Id: <200006060027.JAA00822@daniel.sobral> Subject: Re: Optimization In-Reply-To: <20000605170742.C9146@mrnutty.zabbo.net> from "Zach Brown" at "Jun 5, 2000 05:07:42 pm" To: "Zach Brown" Date: Tue, 6 Jun 2000 09:27:21 +0900 (JST) Cc: hackers@FreeBSD.ORG Disclaimer: Klaatu Barada Nikto! X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Unheedful of thy elder's warnings, Zach Brown wrote: > > Don't forget the effects of caching. If x/y are always referenced > together, and memory is slow slow slow (on, say, any processor made in > the last few years) then the cost of unmushing the data in the cpu > could be much cheaper than the cost of going to memory to get x and y > from different tables. It all depends on access patterns. That's why I used a table of structure instead of two tables. The second fetch on the alternative A is all but garanteed to be cached. > do some benchmarking. extra credit for using cpu counters to get Real > Numbers :) http://www.fz-juelich.de/zam/PCL/doc/pcl/pcl.html Benchmarks can be deceiving if you don't know the issues behind the code. -- Daniel C. Sobral (8-DCS) dcs@newsguy.com dcs@freebsd.org capo@there.is.no.bsdconspiracy.net The smallest worm will turn being trodden on. -- William Shakespeare, "Henry VI" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message