-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize size of Node and Array #7992
Conversation
The size of Node and Array decresed from 64 and 128 to 56 and 112. Some redundant code removed in Spec class.
Reduse the stack usage of StringIndex::leaf_insert from 832 to 608 (debug) and StringIndex::TreeInsert from 208 to 128
This cuts the -O0 stack space used on the recursive path a bit so it'll reduce the maximum stack space required for an index update. There isn't really a clear answer to if it's by enough. |
case NodeChange::change_None: | ||
return; | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that this case should never happen, should we have a REALM_UNREACHABLE here?
m_keys.init_from_parent(); | ||
} | ||
|
||
m_keys.init_from_parent(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider adding an assertion that m_top.get_as_ref(s_col_keys_ndx) is not zero (not blocking)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, we don't check the other entries and I am sure we will have an assertion down the line if the ref is zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 👍
Pull Request Test Coverage Report for Build jorgen.edelbo_406Details
💛 - Coveralls |
It is a long time since there was a difference in how init_from_parent() and update_from_parent() should work.
@ironage please have a second look. I have made some more changes. |
m_top.update_from_parent(); | ||
m_spec.update_from_parent(); | ||
m_top.init_from_parent(); | ||
m_spec.init_from_parent(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, good to clean this confusion up.
The size of Node and Array decresed from 64 and 128 to 56 and 112. Some redundant code removed in Spec class.
What, How & Why?
The second commit may fix #7847
☑️ ToDos
bindgen/spec.yml
, if public C++ API changed