提高管道传输速度

Posted on 2019-07-27 21:16  努力成长静待花开  阅读(189)  评论(0编辑  收藏  举报

效果:

  

代码:

$Command_1={1..1500|ForEach-Object {"Line: $_" }}
$Command_2={1..1500|&{process{"Line: $_"}}}

$Command_1,$Command_2|ForEach-Object{(Measure-Command $_).TotalMilliseconds}