Xref: utzoo comp.sys.ibm.pc:37405 alt.msdos.programmer:621 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!van-bc!norsat!dbin From: dbin@norsat.UUCP (Dave Binette) Newsgroups: comp.sys.ibm.pc,alt.msdos.programmer Subject: Re: Turbo C far pointers Message-ID: <150@norsat.UUCP> Date: 1 Nov 89 11:16:12 GMT References: Reply-To: dbin@norsat.UUCP (Dave Binette) Organization: Norsat International Research Inc. Surrey, BC, CANADA Lines: 15 In article hp0p+@andrew.cmu.edu (Hokkun Pang) writes: >I read from a book that "ptr[i]" will be converted to "*(ptr+i)" by the >compiler, so the "*(ptr+1)" is faster than "ptr[1]". Is that right? Its possible but not alwyays determinable. In fact it may depend on the compiler and the native CPU. Some CPU's handle array indexing more efficiently than pointers so in either case your kind of at the mercy of those who ported the compiler to your machine. -- OS2... The nightmare continues. uucp: {uunet,ubc-cs}!van-bc!norsat!dbin | 302-12886 78th Ave bbs: (604)597-4361 24/12/PEP/3 | Surrey BC CANADA voice: (604)597-6298 (Dave Binette) | V3W 8E7