-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[async] Faster SFG rebuilding #2069
Conversation
@@ -63,6 +66,13 @@ std::string AsyncState::name() const { | |||
return prefix + "_" + type_name; | |||
} | |||
|
|||
std::size_t AsyncState::get_unique_id(void *ptr, AsyncState::Type type) { |
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.
This will be replaced with a more compact version (ranging in [0, ~1000)
) in the next PR.
@@ -121,6 +123,8 @@ struct AsyncState { | |||
const SNode *snode() const { | |||
return std::get<SNode *>(snode_or_global_tmp); | |||
} | |||
|
|||
static std::size_t get_unique_id(void *ptr, Type type); |
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.
This will be replaced in the next PR.
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.
Great LGTM!
Related issue = #742
This PR avoids the relatively expensive
std::variant<...>::operator==
.We also adjust the order of
optimize_listgen
anddemote_activation
so that more list generations can be removed in the first iteration.Before:
synchronize
: 5.935rebuild_graph
inoptimize_listgen
: 1.668After (1.38x faster):
synchronize
: 4.281rebuild_graph
inoptimize_listgen
: 0.799[Click here for the format server]