From: Glen Miner Newsgroups: comp.os.msdos.djgpp Subject: Re: Optimization Date: Wed, 27 Nov 1996 09:59:15 -0500 (EST) Organization: Newbridge Networks Corporation Lines: 32 Message-ID: References: <57hg9b$or5 AT kannews DOT ca DOT newbridge DOT com> <329C4CD4 DOT 7474 AT cornell DOT edu> NNTP-Posting-Host: 138.120.136.238 Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII In-Reply-To: <329C4CD4.7474@cornell.edu> To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp > > djgpp? I mean, right now I have a 9x9 array of bytes, and try to index > > all > > you might be better off just using ints (32 bits) instead of 8, or > worse, 16 bit quantities. What makes you say that? I can't see how this would make it faster... more cache misses, and an extra shift to index non-byte sized quantities. Not to mention the fact that there are more byte sized registers. > > Since this code _is_ a port, I have noticed some data conversion too. > An > > int is no longer 16 bits long. Since I don't really need a 32 bit int > in > > the core code would it help at all for me to change things to "short > > unsigned int"s? > > most probably changing things from 32 bit quantities to 16 bit > quantities will make your program run slower because of the extra > indexing required. Extra indexing?! You'll have to justify that statement, cause' I'm not buying it. > did you actually profile your code to see where the bottlenecks are? Yes. I know exactly where I need to improve. Peace ===[ Gabo / [ABC] : gaminer AT undergrad DOT math DOT uwaterloo DOT ca ]=================== Latest ABC Shogi: http://www.undergrad.math.uwaterloo.ca/~gaminer/shogi.html "What Greenpeace spends in a year General Motors spends in four hours" -Moby