Skip to content

Nothing comparison improvement in stdlib/Distributed/src/managers.jl#41881

Merged
aviatesk merged 1 commit intoJuliaLang:masterfrom
AtsushiSakai:nothing-comparison-improvement
Aug 13, 2021
Merged

Nothing comparison improvement in stdlib/Distributed/src/managers.jl#41881
aviatesk merged 1 commit intoJuliaLang:masterfrom
AtsushiSakai:nothing-comparison-improvement

Conversation

@AtsushiSakai
Copy link
Copy Markdown
Contributor

I'm not sure this is intended or not, but some codes in stdlib/Distributed/src/managers.jl are using equality comparison (==) for nothing, not identical comparison (===).
If this is not intended, I think later one should be used for small performance improvement.

Copy link
Copy Markdown
Member

@aviatesk aviatesk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These calls will be inlined to x === nothing by compiler, but I don't think it hurts anything if we manually inline them.

@aviatesk aviatesk added the merge me PR is reviewed. Merge when all tests are passing label Aug 13, 2021
@AtsushiSakai
Copy link
Copy Markdown
Contributor Author

These calls will be inlined to x === nothing by compiler

I didn't know that. Thanks!!.

@aviatesk aviatesk merged commit 73e5522 into JuliaLang:master Aug 13, 2021
@AtsushiSakai AtsushiSakai deleted the nothing-comparison-improvement branch August 13, 2021 22:20
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Aug 25, 2021
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Keno pushed a commit that referenced this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants