Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15999
| From | Chris Down <chris@chrisdown.name> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: performance bug of [[ $x ]] |
| Date | 2020-03-07 22:58 +0000 |
| Message-ID | <mailman.2267.1583621904.2412.bug-bash@gnu.org> (permalink) |
| References | <CABrM6w=ignEwgynRTYYbBLUNs=KVhE8WCf9h=kkgHj00QNoqmw@mail.gmail.com> <20200307225816.GA997327@chrisdown.name> |
Peng Yu writes: >[[ $x ]] just tests whether the variable $x is of length 0 or not. So >its performance should not depend on how long the variable is. Who said it has anything to do with the [[ builtin's performance? A shell does a lot more than just running one command. For this and the last issue you posted, you could quite trivially find out the answer yourself using `perf` or another profiler.
Back to gnu.bash.bug | Previous | Next | Find similar
Re: performance bug of [[ $x ]] Chris Down <chris@chrisdown.name> - 2020-03-07 22:58 +0000
csiph-web