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 maybe. #5839
Merged
Merged
Optimize maybe. #5839
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PragmaTwice
reviewed
Aug 11, 2021
lixinqi
reviewed
Aug 11, 2021
PragmaTwice
reviewed
Aug 11, 2021
PragmaTwice
reviewed
Aug 11, 2021
PragmaTwice
reviewed
Aug 11, 2021
PragmaTwice
reviewed
Aug 11, 2021
PragmaTwice
reviewed
Aug 11, 2021
PragmaTwice
reviewed
Aug 11, 2021
PragmaTwice
reviewed
Aug 11, 2021
hjchen2
commented
Aug 11, 2021
template<typename T>
class Maybe<T, typename std::enable_if<std::is_same<T, void>::value>::type> final {
...
SharedOrScalar<cfg::ErrorProto, void*> error_or_scalar_;
^^^^^^^^^^^^^^^^^^^^^^^^^
}; 这里感觉只需要一个 |
还有一个is_error_的标记吧,这里就直接复用了SharedOrScalar,也没什么毛病,SharedOrScalar优化之后开销很低了。 |
感觉可以用 error 是不是 null 判断?一般来讲如果有 error 那肯定不能是空的 error。不过确实 SharedOrScalar 也可以 |
PragmaTwice
reviewed
Aug 11, 2021
lixinqi
approved these changes
Aug 11, 2021
PragmaTwice
reviewed
Aug 11, 2021
PragmaTwice
requested review from
oneflow-ci-bot
and removed request for
oneflow-ci-bot
August 12, 2021 16:00
Speed stats:
|
hjchen2
commented
Aug 13, 2021
PragmaTwice
requested review from
oneflow-ci-bot
and removed request for
oneflow-ci-bot
August 13, 2021 02:48
mark。暂时移除 automerge,两个小时以后加回来。 |
目前只是跑测试,没有加 automerge,到时候把 bot 的 review 加回来就好 |
Speed stats:
|
Speed stats:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.