Skip to content

Minor cleanups in Process.cs - #9195

Merged
Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
iSazonov:cleanup-process
Mar 23, 2019
Merged

Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
iSazonov:cleanup-process

Conversation

@iSazonov

@iSazonov Ilya (iSazonov) commented Mar 22, 2019 •

Copy link
Copy Markdown
Collaborator

PR Summary

  • Use string.Join - it is currently fast and involves no extra allocation except for the result string.
  • Use char consts instead of one char strings

PR Context

Related #9139.

PR Checklist

@iSazonov Ilya (iSazonov) added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Mar 22, 2019

@RDIL Reece Dunham (RDIL) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me

@iSazonov Ilya (iSazonov) self-assigned this Mar 23, 2019
@iSazonov
Ilya (iSazonov) merged commit a47c1b3 into PowerShell:master Mar 23, 2019
@iSazonov
Ilya (iSazonov) deleted the cleanup-process branch March 23, 2019 04:46
@daxian-dbw

Dongbo Wang (daxian-dbw) commented Mar 23, 2019 •

Copy link
Copy Markdown
Member

Use string.Join - it is currently fast and allocation-free.

👍 minor nit: it's not allocation free, but guarantees that no extra allocation is needed other than the result string. I updated the PR description.

@iSazonov Ilya (iSazonov) added this to the 6.3.0-preview.1 milestone Mar 25, 2019
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
* Use string.Join
* Use char const
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants