Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Chris Down Newsgroups: gnu.bash.bug Subject: Re: performance bug of [[ $x ]] Date: Sun, 8 Mar 2020 02:10:11 +0000 Lines: 11 Approved: bug-bash@gnu.org Message-ID: References: <20200307225816.GA997327@chrisdown.name> <20200308021011.GA1065042@chrisdown.name> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Trace: usenet.stanford.edu 1583633420 8358 209.51.188.17 (8 Mar 2020 02:10:20 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: Peng Yu Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=I3zenFvD+mawBxAuOn83zu7rrxk9QLjOtEAWoJf7RUM=; b=La/1Y3PMc8UZyfiL1Bpe9DJF62reuk21xiaGJVBgmXMdrF/qeir2MS1qCAZb1dpLbz CuiAD2mm03wEBl3zb4mYQPUDWDWMEmRjBK4uypyKpKvpH3rUtddYrH/pvFxOUQkp/M5T sDNF/+QQVTc9LkzAD/97X9rE6TAszVMsbMkKg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=I3zenFvD+mawBxAuOn83zu7rrxk9QLjOtEAWoJf7RUM=; b=Q0z3Pd3yaPfl/xKtUFzUEGH1A3hCx+6Nv4LhpGaiX0Mx1XDzFxbnKQ1CGWyaUPriTm 3yxxZoN9H8QLSd8l3w4gDEUiaP/BhsdiBuVUSDYSFcSy/dEvMke28exUr3oAJoDNXv8x CbCBSmIPtKFr0IeqBDD1z0uVOnRIE9SNmddoPJBY4knJap8whHKBMC7xoBtHU2GaYnqH ScEoEa1tQ0b7hmAwDgQSEl0S/F+7/j6MNwroOsYil3LTeeHPbOoBktagg6ffIaK8yFAs vNtVdqeo79n+fmrcuLn6lJgPRkG6ghnJyZMBOxK8S86a5UFAtjDMj9xFSmX/rad4lXe8 eKiA== X-Gm-Message-State: ANhLgQ1PzPMrjcNHxnOpUkwSNq4D6ZfvEOCHcGpjzelIP5GC1rIYz/Vc goJwKt3wXS9SmwI7Cd9AJoC3qQ== X-Google-Smtp-Source: ADFU+vtFmR/+zR5WYM1igp24poGoB7Emin+rzIs32B6TWQ5lil6jUDOIEWPEPnye+h1lX5K4O4h7ew== X-Received: by 2002:a5d:4c92:: with SMTP id z18mr12149583wrs.294.1583633412900; Sat, 07 Mar 2020 18:10:12 -0800 (PST) Content-Disposition: inline In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <20200308021011.GA1065042@chrisdown.name> X-Mailman-Original-References: <20200307225816.GA997327@chrisdown.name> Xref: csiph.com gnu.bash.bug:16001 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 `:`.