Re:Microsoft Replaces Command Prompt with PowerShell in Late...
by pritambaral on Friday November 18, 2016 @09:37AM
(#12987003)
Compare it with cmd.exe's dir
[ Parent
| on HN ]
Re:Microsoft Replaces Command Prompt with PowerShell in Late...
by Already__Taken on Friday November 18, 2016 @10:04AM
(#12987189)
c:\temp>timecmd dir c:\
Volume in drive C is Windows
Volume Serial Number is A0A8-6684
Directory of c:\
01/11/2016 12:45 <DIR> AMD
...
17/11/2016 12:52 <DIR> Windows
9 File(s) 25,337 bytes
18 Dir(s) 71,423,356,928 bytes free
command took 0:0:0.08 (0.08s total)
bat from http://stackoverflow.com/a/6209392
Re:Microsoft Replaces Command Prompt with PowerShell in Late...
by taspeotis on Friday November 18, 2016 @09:57AM
(#12987131)
I have had a quick look through here [1] and most of the answers involve timing precision of two significant digits. By that metric, PowerShell's 2.4ms clocks in at 0.00 seconds. Which means cmd.exe (at a precision of two significant digits) can't beat it.
[1] http://stackoverflow.com/questions/673523/how-to-measure-exe...
Re:Microsoft Replaces Command Prompt with PowerShell in Late...
by Arnavion on Friday November 18, 2016 @04:24PM
(#12990207)
"2.4" or "0.0024" or "24000" all have two significant digits. Leading and trailing zeros don't count as significant digits.
Re:Microsoft Replaces Command Prompt with PowerShell in Late...
by taspeotis on Friday November 18, 2016 @06:32PM
(#12990925)
My mistake, you are right [1]. Thanks for the correction.
Re:Microsoft Replaces Command Prompt with PowerShell in Late...
by jodrellblank on Friday November 18, 2016 @01:14PM
(#12988786)
and find that command prompt dir is faster because it's doing less, because it's less capable. It's not creating System.IO.FileInfo and DirectoryInfo objects for each thing in the directory.