Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16002
| From | Peng Yu <pengyu.ut@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: performance bug of [[ $x ]] |
| Date | 2020-03-07 22:31 -0600 |
| Message-ID | <mailman.2279.1583641886.2412.bug-bash@gnu.org> (permalink) |
| References | <CABrM6w=ignEwgynRTYYbBLUNs=KVhE8WCf9h=kkgHj00QNoqmw@mail.gmail.com> <20200307225816.GA997327@chrisdown.name> <CABrM6w=f1bqMekCcfSdzYGrMVFTzpWFniFKhspfBqdfyDxn1hQ@mail.gmail.com> <20200308021011.GA1065042@chrisdown.name> <CABrM6wk5n4Qjk_P+7T63GoHhkGSJJZkfJDV3mBxCHJCeoryXcA@mail.gmail.com> |
My OS is Mac OS X. I don't have perf. Is it only on linux? Could you
show me the output of your perf?
On 3/7/20, Chris Down <chris@chrisdown.name> wrote:
> Peng Yu writes:
>>Could you show me how you do the profiling for this specific case?
>>Based on what proof that you can conclude that it is not the `[[`
>>performance problem?
>
> Like I said, `perf` is perfectly adequate.
>
> bash -c 'x=$(printf "%.sx" {1..10000000}); perf record -g -p $$ & sleep
> 2; time [[ $x ]]'
>
> You might as well just use `:`.
>
--
Regards,
Peng
Back to gnu.bash.bug | Previous | Next | Find similar
Re: performance bug of [[ $x ]] Peng Yu <pengyu.ut@gmail.com> - 2020-03-07 22:31 -0600
csiph-web