Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14986 > unrolled thread
| Started by | Peng Yu <pengyu.ut@gmail.com> |
|---|---|
| First post | 2018-12-27 23:32 -0600 |
| Last post | 2018-12-27 23:32 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Should [[ -v 1 ]] be supported? Peng Yu <pengyu.ut@gmail.com> - 2018-12-27 23:32 -0600
| From | Peng Yu <pengyu.ut@gmail.com> |
|---|---|
| Date | 2018-12-27 23:32 -0600 |
| Subject | Re: Should [[ -v 1 ]] be supported? |
| Message-ID | <mailman.6441.1545975916.1284.bug-bash@gnu.org> |
> You're whacking moles. Use a profiler. That's what they're for. I've already shown that $() is a major problem to slow down the speed and I have reduced using its usage in my code and significantly improved the performance. Nevertheless, it doesn't mean that it is not necessary to systematically evaluating features that are used frequently. > Yes, I can. You need to identify where bash is _actually_ spending most > of its execution time, and a profiler can help you do that. Yes and no. For a particular bash script, you can quantify which bash features are the most time-consuming. But you can not profile all the bash scripts that have ever been written. Since there are only limited features in bash, in this case, a logical way to go is to at least profile each commonly used feature with minimal code (as just for and repetitive calling that features as I do) and understand its pros and cons. A profiler is an overkill in this case. -- Regards, Peng
Back to top | Article view | gnu.bash.bug
csiph-web