0

This question already has an answer here:

According to this Wikipedia article: List of command-line interpreters there is more than a dozen command-line interpreters.

Which one is most efficient in a term of performance. Why should I use something else then standard bash?

I am not asking about "fundamental difference" between *NIX shells as I cannot find nothing about performance there.

I am simply asking if you run same code (if it's compatible) with different Shell interpreter on the same hardware, would it be some difference in performance?

marked as duplicate by sebasth, Archemar, roaima, Stephen Rauch, Anthon Sep 20 '17 at 14:01

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 5
    If your script relies on the speed of interpretation of the shell, then you're letting the shell do too much, or you use the shell in the wrong way. – Kusalananda Sep 20 '17 at 12:47
  • 2
    Start up speed is one reason why /bin/sh on debian based system is dash. For more details, see for example Why this change was made? on ubuntu wiki. – sebasth Sep 20 '17 at 12:52
  • ksh93 is alleged to be faster than Bash while providing a similar feature set, from a scripting standpoint, but I don't know of a well-regarded shell benchmarking suite. I'm with Kusalananda: if you need it to be fast, why are you using shell? – Warren Young Sep 20 '17 at 13:31
  • 2
    Terms of what speed? Runtime? Development? Both aggregated over a script's lifetime? – roaima Sep 20 '17 at 13:34
  • @Kusalananda exactly! I just need to follow "general rules" of my company. As we use bash to write custom scripts for Icinga monitoring. I have figured that same script (with more or less same logic) that is written in php is about 300% faster! So because i need to follow these rules and to take care of server resources, I am asking with which interpreter I would get best performance – spaceman117X Sep 20 '17 at 13:41