[comp.lang.c] Portable C vs Efficient C or "C

preece@ccvaxa.UUCP (05/07/87)

  doug@edge.UUCP:
> I wasn't referring to efficiency.  I was referring to predictability.  I
> can look in my book here and find that on a 10MHz 68000, the instruction
>   MOVE.W 6(A0),D0    will take exactly 1.6+.1w microseconds, for a "w" wait
> state memory.  I haven't the vaguest idea how long it will take to
> execute
>   temp1 = ptr1->count; and what's worse, a change to some other part of
> the same module could cause this statement to be faster or slower (as
> the result of global optimization).  Okay?
----------
It may be slightly harder to determine the execution time for the C
code, but it should still be deterministic as long as you're using the
same compiler and the same hardware.  If you retarget your code you would
need to review critical time dependencies, but the same would be true if
you retargetted your assembler code to a different clock rate, different
memory management hardware, or to hardware with more or less cache.

-- 
scott preece
gould/csd - urbana
uucp:	ihnp4!uiucdcs!ccvaxa!preece
arpa:	preece@gswd-vms