2 ms·
It doesn't require this as long as the program has the same side effects - the contents of memory are not a side effect necessarily. The problem is that there
by astrange 6y ago
It doesn't require this as long as the program has the same side effects - the contents of memory are not a side effect necessarily.
The problem is that there are lots of operations which imply the existence of part of an object, like passing around pointers or allocating single objects at a time, and that would disable these layout optimizations. An optimization that's easy to break isn't useful even if it would help a lot; you want them to be predictable more than anything.