3 ms·
It probably doesn't matter too much if you have only a handful of function invocations in your exec. But if you have a a couple orders of magnitude more... RAM
by jrochkind1 5y ago
It probably doesn't matter too much if you have only a handful of function invocations in your exec. But if you have a a couple orders of magnitude more... RAM is going to be an issue too maybe.
Creating a new process for every single function invocation seems crazy to me, and but might actually be just fine for many "ordinary" use cases? (Although might not have been on computers of 20+ years ago, which might also be why it's not something advised, so much of bash tradition is decades old?)
- kevincox 5y agoOf course the subshell is copy-on-write so the ram requirements shouldn't be huge. But assuming some stack you are using at least some stack in each process you are looking at 4k per call which adds up fairly quickly.