Re:XOR Linked List
by nuje on Friday May 04, 2012 @07:35AM
(#3927936)
There's been some invisible barriers for compilers
to start reorganising data and not just code.
It would seem to me that side has even more potential
than semantics preserving code optimization that
takes data layout as a given.
[ Parent
| on HN ]
Agreed. It would already make a lot of difference if the compiler could make decisions between (for example) structure of arrays or array of structures representations. The programmer could always organize the data in a human-sensible way, and the compiler would transparently convert it to an efficient internal representation, with only the fields that are necessary for certain computations.
Of course there are some cases in which the binary layout matters (for example, serialization, or buffer handling in network code), but those can be regarded as glorified (un)parsers instead of fixed data layout. Would also make the langsec people happy.