Path: utzoo!mnetor!uunet!mcvax!enea!tut!santra!clinet!msa
From: msa@clinet.FI (Markku Savela)
Newsgroups: comp.lang.c
Subject: Re: Indexing vs pointers
Message-ID: <639@clinet.FI>
Date: 8 May 88 20:01:11 GMT
References: <1988Apr8.183815.3187@utzoo.uucp> <449@goofy.megatest.UUCP> <2200@louie.udel.EDU> <587@vsi.UUCP> <629@clinet.FI> <834@srs.UUCP>
Reply-To: msa@clinet.UUCP (Markku Savela)
Organization: City Lines Oy, Helsinki, Finland
Lines: 15

In article <834@srs.UUCP> srs!craig@cs.rochester.edu (Craig Schmackpfeffer) writes:
>
>The problem occurs when you are trying to index anything bigger than a 
>single character. [...]

  Yes, I quite right! I merely wanted to point out, that one shouldn't
make statemens like " *s++ = *p++  is ALWAYS better than s[i] = p[i]; ++i"
and gave ONE counter example (Intel machine + large memory model).

  I think it's very good practice occasionally check the assembler code
your high level language compiler procudes. I do generally this kind
of thing after a program works. And sometimes I change my coding as a
result (if I feel the relevant spot of code is critical).

Markku Savela,   msa@clinet.fi