Packed structures (was: Absolute size of 'short')

thad at cup.portal.com thad at cup.portal.com
Mon Aug 29 16:28:07 AEST 1988


But, the machine for which I *NEEDED* that capability (DECSYSTEM-20) does
have pointers to bits (bits of any size from 1 to 36 bits).  I also needed
needed the equivalent of "packed structures" (and implemented that, too).

The original "program" comprised some 1,000,000 lines of assembly code of
which I did approx. 50% (parsers, code gen, runtime, etc.).  3 years ago
began the re-implementation in C (to ease porting to other architectures),
but approx. 25% of the DEC-20 implementation remains in assembly with which
the new C code must co-exist (esp. data structures).

For the VAX and 68020 implementations, nearly all bit fields (AND unions)
have been removed.

The discussion re: packed structures earlier in this newsgroup brings home
a requirement that sometimes storage efficiency "weighs more" than does
processing efficiency.

Some of my clients have databases (processed using my product) exceeding
100,000,000 "records"; for them, storage efficiency is critical (also
reduces I/O bandwidth).

Having the sources to the compiler was a lifesaver; was able to timely
and cost-effectively solve a real problem (fully realizing the non-portability
of my solution).



More information about the Comp.lang.c mailing list