Replies: 1 comment 2 replies
-
There is one benchmark inside the
It essentially benchmarks a small program with a mix of variables, commands, expansions, and external programs (i.e. cat):
The summary is that the native Go bits of the interpreter are fast enough for its use cases so far. Right now, the slowest part of the shell by far is using But also, the performance will heavily depend on your use case. If you only need to run a small shell script, then it's likely that this interpreter will be faster than Bash for you from Go, as you'll avoid having to call Bash as a separate program - thus saving milliseconds. If you need to run a very complex and long shell script, then it's entirely possible that shells like Bash might be faster, simply because they might have optimized some edge cases that we haven't yet. You should measure and compare for your use case :) |
Beta Was this translation helpful? Give feedback.
-
Has anyone ever compared the performance of
gosh
to something likebash
ordash
?Beta Was this translation helpful? Give feedback.
All reactions