"Numerical Recipes in C" is nonportable code

News system news at ism780c.isc.com
Sat Sep 17 10:25:08 AEST 1988


In article <1988Sep15.145026.20325 at ateng.uucp> chip at ateng.UUCP (Chip Salzenberg) writes:
>According to peter at ficc.uu.net (Peter da Silva):
>>But nobody says you have to load the selector into a selector register
>>just to compute an address.
>
>More to the point:  The dpANS says you (the implementor) are _allowed_ to
>load the selector into a selector register when computing the address.  To
>do otherwise could slow down register-intensive pointer manipulation.
>

But consider what might have happened had dpANS mandated that the compution
of a pointer to x[-1] be a valid operation.  Then machines for wich the
mandated behavior is slow would be not used by people interested in high
performance.  The net effect could be salubrious for the computer industry in
the long run.

   Marv Rubinstein



More information about the Comp.lang.c mailing list