Skip to content

Conversation

@dawedawe
Copy link
Contributor

Description

According to CA1820 it's more performant to do checks of empty strings by using String.IsNullOrEmpty() or the Length property.

Checklist

  • Test cases added

  • Performance benchmarks added in case of performance changes

  • Release notes entry updated:

    Please make sure to add an entry with short succint description of the change as well as link to this pull request to the respective release notes file, if applicable.

    Release notes files:

    • If anything under src/Compiler has been changed, please make sure to make an entry in docs/release-notes/FSharp.Compiler.Service/<version>.md, where <version> is usually "highest" one, e.g. 42.8.200
    • If language feature was added (i.e. LanguageFeatures.fsi was changed), please add it to docs/releae-notes/Language/preview.md
    • If a change to FSharp.Core was made, please make sure to edit docs/release-notes/FSharp.Core/<version>.md where version is "highest" one, e.g. 8.0.200.

    Examples of release notes entries:

    If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request.

@dawedawe dawedawe requested a review from a team as a code owner December 14, 2023 08:44
@nojaf nojaf added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Dec 14, 2023
Copy link
Contributor

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

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

Thanks!

@psfinaki psfinaki enabled auto-merge (squash) December 14, 2023 15:00
@vzarytovskii vzarytovskii merged commit b846403 into dotnet:main Dec 14, 2023
@dawedawe dawedawe deleted the optimize_empty_string_compares branch December 14, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants