Path: utzoo!attcan!uunet!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.sys.intel Subject: Re: Using short ints Keywords: 80386 int Message-ID: <12937@steinmetz.ge.com> Date: 12 Jan 89 14:17:49 GMT References: <13@rsoft.UUCP> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 24 Here's some info from my benchmarks file. It indicates that the use of shorts might buy you a few percent, but I wouldn't write any code using it. This doesn't show converting the short to int every time it's used as a subscript, passed as an argument, or used in a calculation. I'd save short for places where you need to save space... ________________________________________________________________ System id: GV386+287, 1MB 16MHz+cache Optimized math results: Math operations, effective instructions/sec (thousands) Add Sub Mpy Div Wtd. Avg. short: 1973.7 1973.7 843.4 493.8 1469.1 long: 1973.7 1948.1 789.5 329.7 1423.4 float: 45.2 44.4 39.8 22.5 40.2 double: 41.5 41.0 28.2 21.6 35.0 int: 1975.3 1948.1 789.5 329.7 1423.8 -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me