Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - preformance stats

Reply
 
Old 04-13-2007   #1 (permalink)
klumsy@xtra.co.nz


 
 

preformance stats

Does anybody want to have a go at trying to work out the meaning of
the following preformance stats

I had expected the first set, to be faster than the second set, given
that the second set bascailly has to make a new array each time in the
pipeline when casting the enumerator, since internally powershell is
sure to be using a list..
however it seems the overhead of processing the PROCESS { } area in a
scriptblock takes more effort than even CLONE()ing arrays

$top = 30000
"BASE"
(measure-Command { $a = 1..$top | % { $_ } }).totalseconds
"PROCESS"
(measure-Command { $a = 1..$top | & { process { $_ }} | %
{ $_ } }).totalseconds
(measure-Command { $a = 1..$top | & { process { $_ }} | & { process
{ $_ }} |% { $_ } }).totalseconds
(measure-Command { $a = 1..$top | & { process { $_ }} | & { process
{ $_ }} | & { process { $_ }} | % { $_ } }).totalseconds
'$INPUT'
(measure-Command { $a = 1..$top | & { [object[]]$input } | %
{ $_ } }).totalseconds
(measure-Command { $a = 1..$top | & { [object[]]$input }| &
{ [object[]]$input }|% { $_ } }).totalseconds
(measure-Command { $a = 1..$top | & { [object[]]$input } | &
{ [object[]]$input } | & { [object[]]$input } | %
{ $_ } }).totalseconds
(measure-Command { $a = 1..$top | & { $input.Clone() } | &
{ $input.Clone() } | & { $input.Clone() } | % { $_ } }).totalseconds


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Free preformance scan on this site safe? General Discussion
Preformance Monitor is this ok?Sys Stability Chart Vista General
First post: Preformance loss with Vista x64 vs XP General Discussion
Preformance Vista General
Preformance Problem Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46