4 ms·
> slow and error-prone And yet in all my tests Unix was at least an order of magnitude faster than PowerShell. Considering the data doesn't back you, I'd watc
by mpweiher 9y ago
> slow and error-prone
And yet in all my tests Unix was at least an order of magnitude faster than PowerShell.
Considering the data doesn't back you, I'd watch my proclamations.
- justinsaccount 9y agoA specific implementation not being particularly optimized does not mean the underlying concept is flawed.
- josefx 9y agoThe claim was that text based tools are slower, right now that is clearly not the case. Of course a comparison between the current implementation of powershell and unix tools is not quite fair, they only had twelve years after all and unix had ~fourty. I would give them annother three decades to catch up.
- mhermher 9y agoCompiled code generally runs faster than plain-text interpreted code, even with no compiler optimizations. How about those tools? The whole point was that text parsing is an additional overhead that will make things slower. It's trivially true.
- flukus 9y agoHow does powershell pass objects from one process to another? Presumably there's a serialization/deserialization step involved? This could easily be slower than copying test around.
- mhermher 9y agoThere doesn't have to be. It could just pass references to memory addresses of the object, or even just a copy of the raw binary data. If both the passer and the receiver understand the class of the object, then there is no serialization/deserialization necessary.
- flukus 9y ago> It could just pass references to memory addresses of the object How? They're different processes running in different threads. If it's raw binary data then it has to at least be copied, which will often be a lot less efficient than just copying text. You can't just memcpy complex .net objects though. There's nothing stopping unix programs from piping raw binary data, it's just not generally done because it's usually a bad idea.
- mrguyorama 9y agoI don't think powershell is slow because of the everything-as-object philosophy. I think performance just isn't a massive objective because (possible chicken and egg) it's not that prevalent. It could very well be that object passing could be faster than the serialize-unserialize overhead, but powershell is poorly implemented
- WorldMaker 9y agoNot to mention that many speed tests I've seen of PowerShell involve lots of producing text and/or parsing text (including interoperating with existing Unix-like commands). Very few speed comparisons I've seen take advantage of the object capabilities of PowerShell.
- cmrdporcupine 9y agoIt just so happens that over 44 years people have learned how to write excellent performing code for this environment. And Bash is very old at this point, so very care-taken. I mean, I agree with most of the above-poster's complains about *nix. I think it's terrible. But it has the huge advantage of being there, of being reliably what it is, of having a rather well understood set of facilities, and having an immense history of use. Because of IBM and Microsoft's misteps in the 80s and early 90s -- with OS/2 and NT respectively -- we don't have a dominant workstation or server operating system that isn't Unix. Sad, but pragmatic fact.
- Aloha 9y agoUnix is terrible, but nearly everything else created to replace it, is worse.