4 ms·
Compare it with cmd.exe's dir
by pritambaral 10y ago
Compare it with cmd.exe's dir
- taspeotis 10y agoI 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-execution-time-of-command-in-windows-command-line http://stackoverflow.com/questions/673523/how-to-measure-exe...
- Arnavion 10y ago"2.4" or "0.0024" or "24000" all have two significant digits. Leading and trailing zeros don't count as significant digits.
- taspeotis 10y agoMy mistake, you are right [1]. Thanks for the correction. [1] https://en.m.wikipedia.org/wiki/Significant_figures https://en.m.wikipedia.org/wiki/Significant_figures
- Already__Taken 10y agoc:\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 http://stackoverflow.com/a/6209392
- jodrellblank 10y agoand 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.