This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Reorder data fields for v7?


Paolo Carlini writes:
 > Hi,
 > 
 > this is a project that I'd like to propose for v7, that is, suited for
 > libstdcxx_so_7-branch. In my opinion we have been a little sloppy about
 > data fields ordering: indeed, Rth often points out this kind of problem
 > in patches but we (I, in the first place!) didn't listen ;)
 > 
 > As a simple, toy example, consider the following one, inspired from
 > __numpunct_cache:

[snip]

 > So, 4 bytes saved for free... I suspect that even more can be gained
 > in other cases, especially on 64-bit machines.

Mea culpa.  I should have thought about member order when I was working on
this.  Ah well.  Nice savings.

 > Do we agree that all our structs should be audited and reordered when
 > necessary? I think so, even if sometimes would be a not completely
 > mechanical work (32-bit vs 64-bit, != linux, maximize clarity).

It does sound like a good idea.  This seems like just one of a number of
things that probably should be done to the library when the ABI breaks.
Another is auditing performance on other API's and trying to improve where
possible.  Improving performance often seems to be hazardous to the ABI.

What would really be required or desired before freezing the ABI for a long
period of time?

Jerry


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]