Browse by Tags

  • Speed Up Loops

    First, compare these two code samples: $array = 1 . .10000 Measure-Command { for ( $x = 0 ; $x -lt $array . Count ; $x ++ ) { $array [ $x ] } } Measure-Command { $length = $array . Count for ( $x = 0 ; $x -lt $length ; $x ++ ) { $array [ $x ] } } The...
    Filed under: ,
Copyright 2012 PowerShell.com. All rights reserved.