PowerShell优化和性能测试

measure-command -expression {$null = "abc"}  效率高于 {"abc" |out-null }

foreach {$p in $pp}效率高于 $pp|foreach-object {$_}

 if(1) {"Do"}  效率高于 If (1 -eq $true) {"Do"} ,高于  $a=1 ;if($a = 1) {"Do"}

 if(0) {"Do"}

PowerShell优化和性能测试
http://www.pstips.net/optimization-and-performance-testing.html
让你的PowerShell For循环提速四倍
http://www.pstips.net/make-your-powershell-for-loops-4x-faster.html
优化PowerShell的性能和内存消耗
http://www.pstips.net/optimize-powershell-performance-and-memory-consumption.html
PowerShell提速和多线程
http://www.pstips.net/speeding-up-powershell-multithreading.html
优化PowerShell脚本的几个小技巧
http://www.pstips.net/tips-for-optimizing-powershell-scripts.html
轻量级的PowerShell性能测试
http://www.pstips.net/lightweight-performance-testing-with-powershell.html
posted on 2014-05-23 22:21  momingliu11  阅读(952)  评论(0编辑  收藏  举报