From: SourceForge.net <no...@so...> - 2007-12-22 17:43:25
|
Feature Requests item #1856455, was opened at 2007-12-22 09:43 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1856455&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: zero length bitfield starts new byte allocation Initial Comment: The zero length bitfield declaration in the attached code causes the compiler to start a new byte for structure member allocation altough the next field would still fit into the same byte. This is not optimal behaviour regarding code space consumption. I would expect that the compiler compacts bits into the same byte till the next field fits into it. (I accept that zero length bitfield is quite abnormal but it can be useful to temporarily eliminate a field for debugging purposes without commenting out the corresponding field initialisers, which is a big task in case of big initialised structure arrays.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1856455&group_id=599 |
From: SourceForge.net <no...@so...> - 2007-12-22 17:56:50
|
Feature Requests item #1856455, was opened at 2007-12-22 18:43 Message generated for change (Comment added) made by bortel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1856455&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: zero length bitfield starts new byte allocation Initial Comment: The zero length bitfield declaration in the attached code causes the compiler to start a new byte for structure member allocation altough the next field would still fit into the same byte. This is not optimal behaviour regarding code space consumption. I would expect that the compiler compacts bits into the same byte till the next field fits into it. (I accept that zero length bitfield is quite abnormal but it can be useful to temporarily eliminate a field for debugging purposes without commenting out the corresponding field initialisers, which is a big task in case of big initialised structure arrays.) ---------------------------------------------------------------------- Comment By: Laszlo BORTEL (bortel) Date: 2007-12-22 18:56 Message: Logged In: YES user_id=1063737 Originator: NO Sorry, I forgot to login before submitting this optimisation request. The title should rather be "Optimisation of zero length bitfield allocation" Laszlo BORTEL bor...@t-... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=350599&aid=1856455&group_id=599 |