bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: performance bug of [[ $x ]]


From: Chris Down
Subject: Re: performance bug of [[ $x ]]
Date: Sat, 7 Mar 2020 22:58:16 +0000

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]