Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14986
| From | Peng Yu <pengyu.ut@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Should [[ -v 1 ]] be supported? |
| Date | 2018-12-27 23:32 -0600 |
| Message-ID | <mailman.6441.1545975916.1284.bug-bash@gnu.org> (permalink) |
| References | (2 earlier) <abd86dbc-f6e2-62bd-e9dc-f959e2dbff9f@inlv.org> <CABrM6wkGwVbPdrXTetVsFCiwDPg5JnK4KRh49WqACsKhrrMMdA@mail.gmail.com> <20181228013623.mersdxbzy64dpldp@crack.deadbeast.net> <CABrM6w=2zrjmV24VAgzioAu2iNcyuf3tsi--cfvkCH6MJ7feRA@mail.gmail.com> <20181228015710.tzzbejk36fsgr5wb@crack.deadbeast.net> |
> 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 gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Should [[ -v 1 ]] be supported? Peng Yu <pengyu.ut@gmail.com> - 2018-12-27 23:32 -0600
csiph-web