by VWWHFSfQ · 5y ago · 0 comments
subshells are ridiculously slow because it's a forked child process. imagine forking for every function call in your program....
> I simply do not understand why people keep recommending the {} syntax at all.
because it's almost always what you actually want.
Not for built-in commands.
> Yeah “fork is slow” is the sort of microbenchmark that is mostly irrelevant for shell scripts
Maybe if you're on a Linux kernel, but not everywhere else.