|Syntactic Confectionery Delight|
Re^3: cut vs split (suggestions)by BrowserUk (Pope)
|on Apr 17, 2005 at 03:56 UTC||Need Help??|
Faster than mine also:
40 seconds for cut versus 37 for Perl.
That said, that time for your cut seems almost to good to be true. You are sure that cut can't somehow detect that it is writing to the null device and simply skip it--like perl sort detects a null context and skips?
It's probably just a very well optimised, time-honed Unix utility versus a bad Win32 emulation, but 0.80s for 500,000 records is remarkable enough to make me check.
I just remembered something I discovered a long time ago. The Win32 nul device is slower than writing to a file!?
Actually writing the file cuts the 40 seconds to 14. Go figure.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco.
Rule 1 has a caveat! -- Who broke the cabal?