Opened 9 years ago
Last modified 8 years ago
#9826 new Bugs
compress boost::property
Reported by: | Owned by: | Jeremiah Willcock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | graph |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Hello,
looking at property_map, I noticed that boost::property is wasting space. property<tag,double> will typically have size 16 because of the no_property member. list_edge<Vertex,no_property> will also be too long for the same reason. A proper use of the empty base optimization (possibly through tuple or compressed_pair) should help with this. Partial specializations for no_property may be a simpler alternative.
Graphs can grow large, and it seems quite important to avoid wasting memory.
Note:
See TracTickets
for help on using tickets.
This appears to be a regression caused by:
Before that commit,
property
was implemented with derivation (which is still what the documentation shows...), and the empty base optimization avoided wasting so much space.