Path: utzoo!attcan!uunet!husc6!bloom-beacon!gatech!mcnc!rti!sas!bts From: bts@sas.UUCP (Brian T. Schellenberger) Newsgroups: comp.lang.c Subject: Re: Optimal structure field ordering Message-ID: <568@sas.UUCP> Date: 1 Jul 88 20:53:30 GMT References: <163@navtech.uucp> <2775@ttrdc.UUCP> <164@navtech.uucp> <818@garth.UUCP> Reply-To: bts@sas.UUCP (Brian T. Schellenberger) Organization: SAS Institute Inc, Cary NC Lines: 10 So put the *most commonly used* fields early to optimize access and sort large-to-small to optimize space. Tradeoffs between these two considerations vary widely. But especially if you have one field you use a lot, try to put it first regardless of size; the first field has an offset of zero, ans this is more efficiently accessed on (to put in mildly) a wide variety of machines. -- --Brian, __________________________________________________ the man from |Brian T. Schellenberger ...!mcnc!rti!sas!bts Babble-On |104 Willoughby Lane work: (919) 467-8000 x7783 ____________________________|Cary, NC 27513 home: (919) 469-9389