PoshCode / PowerShellPracticeAndStyle

The Unofficial PowerShell Best Practices and Style Guide
https://poshcode.gitbooks.io/powershell-practice-and-style
Other
2.24k stars 289 forks source link

Suggestion - explain why the second command in PERF-01 is faster #153

Closed m8ram closed 2 years ago

m8ram commented 3 years ago

PERF-01 contains the following example:

[void](Do-Something)
Do-Something|Out-Null

The section does not explain why the second is slower and it is likely that readers will assume Out-Null is to blame. Especially since that is reported on several other forums. However it is the use of the pipeline that affects performance. See e.g. this Stack overflow post for more details. It would be useful to include that explanation.