- 
                Notifications
    
You must be signed in to change notification settings  - Fork 51
 
Open
Milestone
Description
There are two state_t members that have std::size_t type: state_t::m_nested_level and state_t::m_substate_count. On 64-bit platforms they are 64-bit values and occupy 16 bytes of memory.
But the maximum value of m_nested_level is limited by max_deep constant (that is 16 for the last decade and hardly be greater than 256 in the near future). And I'm in doubt that we need something larger that 16-bit value for m_substate_count (even if states for an agent are autogenerated it is hard to imagine a state machine with more than 64K substates for a state).
So if we change the type of m_nested_level to std::uint8_t and type of m_substate_count to std::uint16_t then we can save around of dozen bytes for every state_t instance.
Metadata
Metadata
Assignees
Labels
No labels