Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!osh3!chip From: chip@osh3.OSHA.GOV (Chip Yamasaki) Newsgroups: comp.lang.c Subject: Re: An array in a structure Or an Array Of Structures Message-ID: <1991May01.030335.17188@osh3.OSHA.GOV> Date: 1 May 91 03:03:35 GMT References: <1991May1.005354.3100@milton.u.washington.edu> Organization: U.S. D.O.L - Occupational Safety & Health Admin. Lines: 19 In <1991May1.005354.3100@milton.u.washington.edu> bytor@milton.u.washington.edu (Jill Patterson) writes: >I would be interested in hearing your opinions on the differences between >the two methods, optimization, modifying code later, ect.. I don't know about performance considerations, but I would code for readability here. I think the way to do that would be to consider the way you are accessing them. If you usually access them in pairs then the large array of pairs would be more readable. If they will be accumulated in pairs, but accessed separately (in different parts or the program or in different ways) I think the pair of arrays might (just might) be more readable. As a guess I would lean toward the array of pairs. -- -- Charles "Chip" Yamasaki chip@oshcomm.osha.gov