Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As slow as Python is, though, Bash is more slow. Much more slow.


It’s actually fork() that’s slow, rather than Bash itself.

If you were to write Python code that did a of its business logic by spawning new processes rather than using its core libraries (which are written in C) then you’d find Python would be just as slow too.

But the exact point of Bash and other shells is to make launching new processes easy. This is the point that people miss when they say “write it in a real programming language”. Shells solve an entirely different problem to other languages. And “real” programming languages suck at working with other executables in a quick and convenient way.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: