|CProf cache profiling system available firstname.lastname@example.org (1994-10-13)|
|Data Structure Reorganizing Optimizations [Was: Re: CProf cache profil email@example.com (1994-10-19)|
|Re: Data Structure Reorganizing Optimizations firstname.lastname@example.org (1994-10-22)|
|Re: Data Structure Reorganizing Optimizations robertb@HING.LCS.MIT.EDU (1994-10-26)|
|Re: Data Structure Reorganizing Optimizations johnm@cory.EECS.Berkeley.EDU (1994-10-22)|
|Re: Data Structure Reorganizing Optimizations email@example.com (1994-10-27)|
|Re: Data Structure Reorganizing Optimizations firstname.lastname@example.org (1994-10-23)|
|Data Structure Reorganizing Optimizations email@example.com (1994-10-31)|
|Re: Data Structure Reorganizing Optimizations firstname.lastname@example.org (1994-10-31)|
|Re: Data Structure Reorganizing Optimizations email@example.com (1994-10-31)|
|[17 later articles]|
|From:||robertb@HING.LCS.MIT.EDU (Robert Bedichek)|
|Organization:||MIT Laboratory for Computer Science|
|Date:||Wed, 26 Oct 1994 22:19:26 GMT|
firstname.lastname@example.org (Andy Glew) writes:
>I believe that C's rules about data structure organization are
>obsolete. Certainly, they are not in the ken of the usual programmer
>using C or C++. Why not permit compilers to do such "illegal" data
>structure reorganizations, bringing the performance gains Lebeck and
>Wood describes to the standard application?
>I suggest that this be considered by future X3J11 ANSI C standards (if
>any such revisions are forthcoming).
Many programs would not work after being compiled by a compiler that
freely reorganized structures. If you add such a "feature" to a C
compiler, you'll have to make it a non-default compiler option.
Consider what will break:
1. Device drivers where C structures are used to describe
2. Network code where structures are used to describe stuff that
comes off of the wire.
3. Operating system and library code that depends on the ability
of structures to describe stack frames, especially exception frames.
4. Applications and utilities that make system calls like 'stat()'
where the operating system's compilation used a different layout
for the stat buffer.
5. OS/Apps/Utils that read structures from disk where the C compiler
run that wrote the file disagree with the run that compiled the OS or
application or utility.
C compilers don't have to agree on how they lay out structures, but for
a given architecture, they almost always do. I've had big headaches
when they didn't.
I believe that if you let structures be freely changed, you'll not be
able to run most operating system and utility code, and many
Perhaps you'll let the programmer constrain the layout, as in Ada's
chapter 13 features. I found these features in Ada quite cumbersome and
they were a big hassle for the compiler writers. You would also have to
modify huge amounts of existing C.
Return to the
Search the comp.compilers archives again.