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.