bitfields considered harmful?
Chris Torek
chris at mimsy.UUCP
Sat May 6 13:57:29 AEST 1989
In article <6047 at asterix.UUCP> jimp at asterix.UUCP (Jim Patterson) writes:
>many [machines] have instructions that implement bitfields directly.
And on many of these, the special instructions are *slower* than the
equivalent sequence of and/or/shifts....
That is why we leave the instruction choice to the compiler, and merely
include bitfields as a convenience to the programmer.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at mimsy.umd.edu Path: uunet!mimsy!chris
More information about the Comp.lang.c
mailing list