C Indentation Survey Results

Chris Torek chris at umcp-cs.UUCP
Wed May 8 09:37:24 AEST 1985


> From: zben at umd5.UUCP

> And (as long as we are sharpening axes here) if you were programming in
> PASCAL you could put the sucker in a WITH DEVICE clause and get rid of
> all those "device->" references.  AND, it would be more efficient since
> the reference would only be evaluated once, at the WITH clause ([...]).

Sorry Ben, but (assuming "device" is in a register and you've got a
register offset addressing mode---both of which are perhaps dangerous
assumptions) device->foo.bar.baz is about as fast as you can get:

	decl	24(r9)	# device->foo.bar.baz--; /* sample vax code */

("with" in Pascal generally puts a pointer to the object into a
register; "device" is already a pointer to the object.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at maryland



More information about the Comp.lang.c mailing list