Bash – Which is faster – C or shell scripting – and why

bashcshell-script

I was looking for a detailed info (if possible some statistics) about which is faster to run, C or a shell script. And also I would like to know the reasons for the answer.

P.S. This is not a question of which is better, I know when to use C and when to use shell scripting, but I just wanted to know more about their speed and performance comparisons.

Best Answer

Shell is interpreted, and by itself that means it cannot be as fast as an specially-coded application — provided that what executes is written by equally competent programmers.

More than that, the answer depends on how you count the time: you should count development time as well as the execution time of a script.