Skip to content

Commit 49e4998

Browse files
authored
Corrected .DESCRIPTION
1 parent 2c97410 commit 49e4998

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

AvoidPlusEqualsToBuildStrings.psm1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ function Measure-AvoidPlusEqualsToBuildSting { # PSUseSingularNouns
77
.SYNOPSIS
88
Avoid using the Assignment by Addition Operator to build a collection
99
.DESCRIPTION
10-
Array addition is inefficient because arrays have a fixed size. Each addition to the array
11-
creates a new array big enough to hold all elements of both the left and right operands.
12-
The elements of both operands are copied into the new array. For small collections, this
13-
overhead may not matter. Performance can suffer for large collections.
10+
Strings are immutable. Each addition to the string actually creates a new string big enough to hold the
11+
contents of both the left and right operands, then copies the elements of both operands into the new string.
12+
For small strings, this overhead may not matter. For large strings, this can affect performance and memory
13+
consumption.
1414
.INPUTS
1515
[System.Management.Automation.Language.ScriptBlockAst]
1616
.OUTPUTS

0 commit comments

Comments
 (0)