Xref: utzoo comp.lang.c:7085 comp.unix.wizards:6424 Path: utzoo!mnetor!uunet!husc6!mit-eddie!uw-beaver!uw-june!pardo From: pardo@june.cs.washington.edu (David Keppel) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: Faster C Message-ID: <4177@june.cs.washington.edu> Date: 6 Feb 88 02:26:13 GMT References: <473@aati.UUCP> Reply-To: pardo@uw-june.UUCP (David Keppel) Organization: U of Washington, Computer Science, Seattle Lines: 23 Keywords: 4.1bsd, performance, 11/750 In article <473@aati.UUCP> fish@aati.UUCP (William G. Fish) writes: ->I wish to make the following C code run as fast as possible under 4.1 BSD ->on a VAX 11/750. I've seen VAX instructions such as movc3 and cmpc3 make ->code run 10 to 50 times faster. Are there any CISC instructions that can ->be used in this case? -> ->scan(in, out, c, C, S) -> register short *in; -> register float *out; -> register c; -> int C, S; ->{ -> register sample; -> register s; -> -> for (s = 0; s < S; s++, c += C) -> { -> out[s] = sample = in[c]; /* short to float conversion */ If you change the out[s] and in[c] to use a pointer that is incremented each iteration, you may be able to save yourself an ashl each time. ;-D on (*gazing) Pardo